diff options
author | Chao Xie <chao.xie@marvell.com> | 2013-08-19 03:27:55 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-09-02 11:00:16 +0200 |
commit | 2b274fe522e9d5ac7397e07e3516bb10e3c2ee92 (patch) | |
tree | 17a0fbd4fa0df463abccdf7ff7e3d9fbe567383c /drivers/mfd/88pm805.c | |
parent | mfd: 88pm800: Fix potential NULL pdata dereference (diff) | |
download | linux-2b274fe522e9d5ac7397e07e3516bb10e3c2ee92.tar.xz linux-2b274fe522e9d5ac7397e07e3516bb10e3c2ee92.zip |
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>
Diffstat (limited to 'drivers/mfd/88pm805.c')
-rw-r--r-- | drivers/mfd/88pm805.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/88pm805.c b/drivers/mfd/88pm805.c index 0686cdb06b3e..8a5b6ffb5afb 100644 --- a/drivers/mfd/88pm805.c +++ b/drivers/mfd/88pm805.c @@ -243,7 +243,7 @@ static int pm805_probe(struct i2c_client *client, goto err_805_init; } - if (pdata->plat_config) + if (pdata && pdata->plat_config) pdata->plat_config(chip, pdata); err_805_init: |