summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJonghwan Choi <jhbird.choi@samsung.com>2012-01-16 01:08:42 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2012-03-06 18:46:35 +0100
commitc3ebb30aaeb2a30d69b9db564d93bf3486139c12 (patch)
treec88289ba3691443df7c7c11f9eb38e66ab969d24 /drivers
parentmfd: wm8350 variable dereferenced before check (diff)
downloadlinux-c3ebb30aaeb2a30d69b9db564d93bf3486139c12.tar.xz
linux-c3ebb30aaeb2a30d69b9db564d93bf3486139c12.zip
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')
-rw-r--r--drivers/mfd/s5m-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/s5m-core.c b/drivers/mfd/s5m-core.c
index e075c113eec6..caadabeed8e9 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);