Author: Markus Elfring <elfring@users.sourceforge.net> The functions cpufreq_cooling_unregister() and thermal_zone_device_unregister() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Eduardo Valentin — drivers/thermal/samsung/exynos_thermal_common.c | 9 +++—— 1 file changed, 3 insertions(+), 6 deletions(-) …
Category: Linux
Nov 21 2014
USB-IP: Deletion of unnecessary checks before the function call “usb_put_dev”
Author: Markus Elfring <elfring@users.sourceforge.net> The usb_put_dev() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Valentina Manea Signed-off-by: Greg Kroah-Hartman — drivers/usb/usbip/vhci_hcd.c | 9 +++—— 1 file changed, 3 insertions(+), 6 …
Nov 21 2014
USB-SIS: Deletion of an unnecessary check before the function call “usb_put_dev”
Author: Markus Elfring <elfring@users.sourceforge.net> The usb_put_dev() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Greg Kroah-Hartman — drivers/usb/misc/sisusbvga/sisusb.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …
Nov 21 2014
USB: PCI-quirks: Deletion of unnecessary checks before the function call “pci_dev_put”
Author: Markus Elfring <elfring@users.sourceforge.net> The pci_dev_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Greg Kroah-Hartman — drivers/usb/host/pci-quirks.c | 12 ++++——– 1 file changed, 4 insertions(+), 8 deletions(-) diff …
Nov 21 2014
usb: gadget: function: delete an unnecessary check before rndis_add_hdr()
Author: Markus Elfring <elfring@users.sourceforge.net> The rndis_add_hdr() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Felipe Balbi — drivers/usb/gadget/function/f_rndis.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …
Nov 21 2014
tty: Deletion of unnecessary checks before two function calls
Author: Markus Elfring <elfring@users.sourceforge.net> The functions put_device() and tty_kref_put() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Greg Kroah-Hartman — drivers/tty/tty_io.c | 6 ++—- drivers/tty/tty_port.c | 3 +– 2 files changed, …
Nov 21 2014
tty-hvsi_lib: Deletion of an unnecessary check before the function call “tty_kref_put”
Author: Markus Elfring <elfring@users.sourceforge.net> The tty_kref_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Greg Kroah-Hartman — drivers/tty/hvc/hvsi_lib.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …
Nov 21 2014
target: Deletion of unnecessary checks before the function call “module_put”
Author: Markus Elfring <elfring@users.sourceforge.net> The module_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger — drivers/target/iscsi/iscsi_target_transport.c | 3 +– drivers/target/target_core_hba.c | 6 ++—- 2 files changed, 3 insertions(+), …
Nov 20 2014
host: ehci-w90x900: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = …
Nov 20 2014
serial: icom: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = …