mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
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: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
0cd129de3e
commit
9d54c5d474
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue