Skip to content

Commit

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

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 <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 3163e4c commit 7728495
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/video/fbdev/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1937,8 +1937,7 @@ int via_fb_pci_probe(struct viafb_dev *vdev)
out_dealloc_cmap:
fb_dealloc_cmap(&viafbinfo->cmap);
out_fb1_release:
if (viafbinfo1)
framebuffer_release(viafbinfo1);
framebuffer_release(viafbinfo1);
out_fb_release:
i2c_bus_free(viaparinfo->shared);
framebuffer_release(viafbinfo);
Expand Down

0 comments on commit 7728495

Please sign in to comment.