* leds: dereferencing null
@ 2010-03-08 12:48 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-03-08 12:48 UTC (permalink / raw)
To: kernel-janitors
drivers/leds/leds-88pm860x.c +268 pm860x_led_probe(28) error: dereferencing undefined: 'pdata'
255 if (pdev->dev.parent->platform_data) {
256 pm860x_pdata = pdev->dev.parent->platform_data;
257 pdata = pm860x_pdata->led;
258 } else
259 pdata = NULL;
We set pdata to null here.
260
261 data = kzalloc(sizeof(struct pm860x_led), GFP_KERNEL);
262 if (data = NULL)
263 return -ENOMEM;
264 strncpy(data->name, res->name, MFD_NAME_SIZE);
265 dev_set_drvdata(&pdev->dev, data);
266 data->chip = chip;
267 data->i2c = (chip->id = CHIP_PM8606) ? chip->client : chip->companion;
268 data->iset = pdata->iset;
^^^^^^^^^^^
We dereference it here.
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-08 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-08 12:48 leds: dereferencing null Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox