mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
mfd: Fix possible s5m null pointer dereference
This patch checks for pdata to using it. Signed-off-by: Jonghwan Choi <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
committed by
Samuel Ortiz
parent
aa12242f19
commit
4a55320117
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user