diff options
author | Jonghwan Choi <jhbird.choi@samsung.com> | 2012-01-16 09:08:42 +0900 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-02-20 16:18:55 +0100 |
commit | 4a55320117e2ca4ed9002a365d7e209d73abcdf1 (patch) | |
tree | 58a7f1f3fed2b481c64f39dcdfcea1529f48bc66 /drivers/mfd | |
parent | aa12242f19312b2c60399bd581929fdfc511a017 (diff) |
mfd: Fix possible s5m null pointer dereference
This patch checks for pdata to using it.
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/s5m-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/s5m-core.c b/drivers/mfd/s5m-core.c index e075c113eec..caadabeed8e 100644 --- a/drivers/mfd/s5m-core.c +++ b/drivers/mfd/s5m-core.c @@ -105,7 +105,7 @@ static int s5m87xx_i2c_probe(struct i2c_client *i2c, s5m87xx->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR); i2c_set_clientdata(s5m87xx->rtc, s5m87xx); - if (pdata->cfg_pmic_irq) + if (pdata && pdata->cfg_pmic_irq) pdata->cfg_pmic_irq(); s5m_irq_init(s5m87xx); |