summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang YanQing <udknight@gmail.com>2014-03-05 23:54:18 +0800
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-03-06 11:29:39 +0200
commita57aa93f44f34ce6e3b3ed0b114d5eea46234aef (patch)
tree010ad5d39fb795887d2b27e9a493e72650210f37
parent2925b0d78fa32be3136563f580c852d163a32300 (diff)
downloadop-kernel-dev-a57aa93f44f34ce6e3b3ed0b114d5eea46234aef.zip
op-kernel-dev-a57aa93f44f34ce6e3b3ed0b114d5eea46234aef.tar.gz
video: fbdev: uvesafb: Remove redundant NULL check in uvesafb_remove
Because uvesafb_par is allocated as part of fb_info in uvesafb_probe, so we don't need to do NULL check for both fb_info and uvesafb_par in uvesafb_remove. [ This patch also fix a warning report by fengguang.wu@intel.com "drivers/video/fbdev/uvesafb.c:1815 uvesafb_remove() warn: variable dereferenced before check 'par'" ] Signed-off-by: Wang YanQing <udknight@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/uvesafb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 256fba7..70a02a2 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -1812,11 +1812,9 @@ static int uvesafb_remove(struct platform_device *dev)
fb_destroy_modedb(info->monspecs.modedb);
fb_dealloc_cmap(&info->cmap);
- if (par) {
- kfree(par->vbe_modes);
- kfree(par->vbe_state_orig);
- kfree(par->vbe_state_saved);
- }
+ kfree(par->vbe_modes);
+ kfree(par->vbe_state_orig);
+ kfree(par->vbe_state_saved);
framebuffer_release(info);
}
OpenPOWER on IntegriCloud