mfd: mc13xxx: add codec platform data
Dan Carpenter
dan.carpenter at oracle.com
Tue May 22 00:34:59 EST 2012
Hello Philippe Rétornaz,
This is a semi-automatic email about new static checker warnings.
The patch e3a0871c8f67: "mfd: mc13xxx: add codec platform data" from
May 15, 2012, leads to the following Smatch complaint:
drivers/mfd/mc13xxx-core.c:695 mc13xxx_common_init()
error: we previously assumed 'pdata' could be null (see line 687)
drivers/mfd/mc13xxx-core.c
686
687 if (mc13xxx_probe_flags_dt(mc13xxx) < 0 && pdata)
^^^^^^
Old check.
688 mc13xxx->flags = pdata->flags;
689
690 if (mc13xxx->flags & MC13XXX_USE_ADC)
691 mc13xxx_add_subdevice(mc13xxx, "%s-adc");
692
693 if (mc13xxx->flags & MC13XXX_USE_CODEC)
694 mc13xxx_add_subdevice_pdata(mc13xxx, "%s-codec",
695 pdata->codec, sizeof(*pdata->codec));
^^^^^^^^^^^^
New dereference.
696
697 if (mc13xxx->flags & MC13XXX_USE_RTC)
regards,
dan carpenter
More information about the devicetree-discuss
mailing list