Skip to content

Commit

Permalink
mfd: Fix possible s5m null pointer dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonghwan Choi authored and Samuel Ortiz committed Feb 20, 2012
1 parent aa12242 commit 4a55320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mfd/s5m-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4a55320

Please sign in to comment.