Skip to content

Commit

Permalink
video: fbdev-MMP: Deletion of an unnecessary check before the functio…
Browse files Browse the repository at this point in the history
…n call "mmp_unregister_path"

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 <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Markus Elfring authored and Tomi Valkeinen committed Dec 4, 2014
1 parent 8a8e411 commit 3163e4c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/video/fbdev/mmp/hw/mmp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,7 @@ static void path_deinit(struct mmphw_path_plat *path_plat)
if (!path_plat)
return;

if (path_plat->path)
mmp_unregister_path(path_plat->path);
mmp_unregister_path(path_plat->path);
}

static int mmphw_probe(struct platform_device *pdev)
Expand Down

0 comments on commit 3163e4c

Please sign in to comment.