Commit 9d54c5d4 authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by Helge Deller

video: fbdev: imxfb: Check for null res pointer

The return value of platform_get_resource() needs to be checked.
To avoid use of error pointer in case that there is no suitable resource.
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 0cd129de
......@@ -1083,6 +1083,8 @@ static int imxfb_remove(struct platform_device *pdev)
struct resource *res;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -EINVAL;
imxfb_disable_controller(fbi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment