MLK-11918-1 video: fbdev: mxc ipuv3 fb: Remove fbi NULL pointer check in ->remove()
authorLiu Ying <Ying.Liu@freescale.com>
Mon, 30 Nov 2015 02:18:58 +0000 (10:18 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:19 +0000 (14:49 -0500)
commit5b5bfbf5669079010b8802efa984bda609b6252b
tree16484f9a22fe8106880734480e762dd43f410719
parent09f64aa90034f69f9f6817c316bbc54b22595a66
MLK-11918-1 video: fbdev: mxc ipuv3 fb: Remove fbi NULL pointer check in ->remove()

The driver takes the pointer fbi as the driver data, so fbi cannot be a NULL
pointer in ->remove().  Let's remove the unnecessary NULL pointer check on
fbi.

This patch fixes the following issue reported by Coverity:
deref_ptr: Directly dereferencing pointer fbi.
struct mxcfb_info *mxc_fbi = fbi->par;

Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking fbi suggests that it may be null, but it has
already been dereferenced on all paths leading to the check.
if (!fbi)
return 0;

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
drivers/video/fbdev/mxc/mxc_ipuv3_fb.c