mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mfd: Check t7l66 platform_data pointer
We should check for pdata being not NULL before dereferencing it. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
c5617b200a
commit
9ad285d6db
1 changed files with 3 additions and 0 deletions
|
|
@ -318,6 +318,9 @@ static int t7l66xb_probe(struct platform_device *dev)
|
|||
struct resource *iomem, *rscr;
|
||||
int ret;
|
||||
|
||||
if (pdata == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
|
||||
if (!iomem)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue