diff options
author | Chao Xie <chao.xie@marvell.com> | 2013-08-18 21:27:55 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-09-02 11:00:16 +0200 |
commit | 2b274fe522e9d5ac7397e07e3516bb10e3c2ee92 (patch) | |
tree | 17a0fbd4fa0df463abccdf7ff7e3d9fbe567383c | |
parent | b432fc25b5b0311a58772fefe8d07e143600e908 (diff) |
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>
-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: |