Category: Linux

drm/msm: Deletion of unnecessary checks before the function call “release_firmware”

Author: Markus Elfring <elfring@users.sourceforge.net> The release_firmware() 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 Reviewed-by: Thierry Reding Signed-off-by: Rob Clark — drivers/gpu/drm/msm/adreno/adreno_gpu.c | 6 ++—- 1 file changed, 2 insertions(+), 4 …

Continue reading

staging: olpc_dcon: Deletion of a check before backlight_device_unregister()

Author: Markus Elfring <elfring@users.sourceforge.net> The backlight_device_unregister() 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/staging/olpc_dcon/olpc_dcon.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Continue reading

[media] siano: unnecessary check before rc_unregister_device()

Author: Markus Elfring <elfring@users.sourceforge.net> The rc_unregister_device() 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: Mauro Carvalho Chehab — drivers/media/common/siano/smsir.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   …

Continue reading

Sony-laptop: Deletion of an unnecessary check 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: Darren Hart — drivers/platform/x86/sony-laptop.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Continue reading

ASoC: sigmadsp: fix simple_return.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> sound/soc/codecs/sigmadsp.c:656:1-4: WARNING: end returns can be simpified and declaration on line 636 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown — sound/soc/codecs/sigmadsp.c | 7 +—— 1 file changed, 1 insertion(+), 6 deletions(-)   diff …

Continue reading

platform: x86: Deletion of checks before backlight_device_unregister()

Author: Markus Elfring <elfring@users.sourceforge.net> The backlight_device_unregister() 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 For msi-wmi.c: Acked-by: Anisse Astier Signed-off-by: Darren Hart — drivers/platform/x86/asus-laptop.c | 3 +– drivers/platform/x86/asus-wmi.c | 3 +– …

Continue reading

staging: android: ion: Deletion of unnecessary checks before two function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The functions ion_heap_destroy() and vfree() perform also input parameter validation. 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/staging/android/ion/ion.c | 6 ++—- drivers/staging/android/ion/ion_dummy_driver.c | 6 ++—- drivers/staging/android/ion/tegra/tegra_ion.c | 6 ++—- 3 files changed, 6 …

Continue reading

video: uvesafb: Deletion of an unnecessary check before the function call “platform_device_put”

Author: Markus Elfring <elfring@users.sourceforge.net> The platform_device_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: Tomi Valkeinen — drivers/video/fbdev/uvesafb.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Continue reading

video: fbdev-VIA: Deletion of an unnecessary check before the function call “framebuffer_release”

Author: Markus Elfring <elfring@users.sourceforge.net> The framebuffer_release() 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: Tomi Valkeinen — drivers/video/fbdev/via/viafbdev.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Continue reading

video: fbdev-MMP: Deletion of an unnecessary check before the function call “mmp_unregister_path”

Author: Markus Elfring <elfring@users.sourceforge.net> The mmp_unregister_path() 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: Tomi Valkeinen — drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Continue reading