Category: Linux

Jul 23 2016

PM-wakeup: Delete unnecessary checks before three function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The following functions test whether their argument is NULL and then return immediately. * dev_pm_arm_wake_irq * dev_pm_disarm_wake_irq * wakeup_source_unregister Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Pavel Machek [ rjw: Minor whitespace adjustments ] Signed-off-by: Rafael …

Continue reading »

Jul 23 2016

IB/mthca: NULL arg to pci_dev_put is OK

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 Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford — drivers/infiniband/hw/mthca/mthca_reset.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Continue reading »

Jul 23 2016

IB/hfi1: NULL arg to sc_return_credits is OK

Author: Markus Elfring <elfring@users.sourceforge.net> The sc_return_credits() 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: Doug Ledford — drivers/infiniband/hw/hfi1/file_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff …

Continue reading »

Jul 22 2016

ASoC: Intel: Skylake: Delete an unnecessary check 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 Signed-off-by: Mark Brown — sound/soc/intel/skylake/skl.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Continue reading »

Jul 22 2016

drm/etnaviv: Delete unnecessary checks before two function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The functions drm_gem_object_unreference_unlocked() and vunmap() perform also input parameter validation. Thus the tests around their calls are not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring [seanpaul tweaked subject] Signed-off-by: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/9638cd74-ffc5-d9ee-a40c-9b60e860ad8b@users.sourceforge.net — drivers/gpu/drm/etnaviv/etnaviv_gem.c | 7 ++—– 1 file changed, 2 insertions(+), 5 deletions(-) …

Continue reading »

Jul 22 2016

drm/bridge: ps8622: Delete an unnecessary 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: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/791089e4-201c-ad01-9c3b-f49835765177@users.sourceforge.net — drivers/gpu/drm/bridge/parade-ps8622.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-) …

Continue reading »

Jul 22 2016

drm/qxl: Delete an unnecessary check before drm_gem_object_unreference_unlocked()

Author: Markus Elfring <elfring@users.sourceforge.net> The drm_gem_object_unreference_unlocked() 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: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/913198fa-2aa4-4804-8616-dd495428c0a5@users.sourceforge.net — drivers/gpu/drm/qxl/qxl_display.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) …

Continue reading »

Jul 22 2016

drm/vmwgfx: Delete an unnecessary check before the function call “vfree”

Author: Markus Elfring <elfring@users.sourceforge.net> The vfree() function performs 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: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/8060f2e9-5070-3c10-d55c-dc058e4ca20d@users.sourceforge.net Link: http://patchwork.freedesktop.org/patch/msgid/f1a0fd83-4320-f3db-e1bb-3b9832a4429f@users.sourceforge.net — drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-)   diff –git …

Continue reading »

Jul 22 2016

drm/mgag200: Delete an unnecessary check before drm_gem_object_unreference_unlocked()

Author: Markus Elfring <elfring@users.sourceforge.net> The drm_gem_object_unreference_unlocked() 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: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/05b266e4-2bae-b70b-5a96-ae609496d173@users.sourceforge.net — drivers/gpu/drm/mgag200/mgag200_main.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-) …

Continue reading »

Jul 22 2016

GPU-DRM-GMA500: Delete unnecessary checks before two function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The functions pci_dev_put() and psb_intel_i2c_destroy() test whether their argument is NULL and then return immediately. Thus the tests around their calls are not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/f1a0fd83-4320-f3db-e1bb-3b9832a4429f@users.sourceforge.net — drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 3 +– drivers/gpu/drm/gma500/cdv_intel_lvds.c | 9 +++—— drivers/gpu/drm/gma500/psb_drv.c …

Continue reading »