mfd: dereferencing first then checking
drivers/mfd/t7l66xb.c +371 t7l66xb_probe(58) warn: variable dereferenced before check 'pdata'
338 t7l66xb->irq_base = pdata->irq_base;
[snip]
371 if (pdata && pdata->enable) 372 pdata->enable(dev);
Can pdata be null here? We dereferenced on line 338 without checking.
regards,
dan carpenter
Hi Dan,
Quoted 9 lines · Dan Carpenter
drivers/mfd/t7l66xb.c+371t7l66xb_probe(58)warn: variable dereferenced before check 'pdata'
338t7l66xb->irq_base=pdata->irq_base;[snip] 371 if (pdata && pdata->enable) 372 pdata->enable(dev);Can pdata be null here? We dereferenced on line 338 without checking.
We should definitely check for pdata being not NULL here. I fixed that, thanks for spotting it.
Cheers,
Samuel.
Quoted 2 lines
regards,
dan carpenter
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/