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

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to