mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
mfd: 88pm805: Fix potential NULL pdata dereference
User pass platform data to device, and platform data may be NULL. Add the check for pdata. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
b432fc25b5
commit
2b274fe522
@ -243,7 +243,7 @@ static int pm805_probe(struct i2c_client *client,
|
|||||||
goto err_805_init;
|
goto err_805_init;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdata->plat_config)
|
if (pdata && pdata->plat_config)
|
||||||
pdata->plat_config(chip, pdata);
|
pdata->plat_config(chip, pdata);
|
||||||
|
|
||||||
err_805_init:
|
err_805_init:
|
||||||
|
Loading…
Reference in New Issue
Block a user