summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/88pm805.c
diff options
context:
space:
mode:
authorChao Xie <chao.xie@marvell.com>2013-08-18 21:27:55 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-09-02 11:00:16 +0200
commit2b274fe522e9d5ac7397e07e3516bb10e3c2ee92 (patch)
tree17a0fbd4fa0df463abccdf7ff7e3d9fbe567383c /drivers/mfd/88pm805.c
parentb432fc25b5b0311a58772fefe8d07e143600e908 (diff)
downloadlinux-2b274fe522e9d5ac7397e07e3516bb10e3c2ee92.tar.gz
linux-2b274fe522e9d5ac7397e07e3516bb10e3c2ee92.tar.bz2
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.c2
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: