public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* re: mfd: 88pm800: Enhance sub devices initialization
@ 2013-06-18 14:05 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-06-18 14:05 UTC (permalink / raw)
  To: kernel-janitors

Hello Chao Xie,

This is a semi-automatic email about new static checker warnings.

The patch 1e9f033e4b6c: "mfd: 88pm800: Enhance sub devices 
initialization" from Jun 14, 2013, leads to the following Smatch 
complaint:

drivers/mfd/88pm800.c:504 device_800_init()
	 error: we previously assumed 'pdata' could be null (see line 480)

drivers/mfd/88pm800.c
   479		if (val & PM800_ALARM_WAKEUP) {
   480			if (pdata && pdata->rtc)
                            ^^^^^
Old check.

   481				pdata->rtc->rtc_wakeup = 1;
   482		}
   483	
   484		ret = device_gpadc_init(chip, pdata);
   485		if (ret < 0) {
   486			dev_err(chip->dev, "[%s]Failed to init gpadc\n", __func__);
   487			goto out;
   488		}
   489	
   490		chip->regmap_irq_chip = &pm800_irq_chip;
   491	
   492		ret = device_irq_init_800(chip);
   493		if (ret < 0) {
   494			dev_err(chip->dev, "[%s]Failed to init pm800 irq\n", __func__);
   495			goto out;
   496		}
   497	
   498		ret = device_onkey_init(chip, pdata);
   499		if (ret) {
   500			dev_err(chip->dev, "Failed to add onkey subdev\n");
   501			goto out_dev;
   502		}
   503	
   504		ret = device_rtc_init(chip, pdata);
                                            ^^^^^
New dereference.

   505		if (ret) {
   506			dev_err(chip->dev, "Failed to add rtc subdev\n");

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-18 14:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 14:05 mfd: 88pm800: Enhance sub devices initialization Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox