regulator: tps65217: Add device tree support
AnilKumar, Chimata
anilkumar at ti.com
Mon Jul 16 21:07:44 EST 2012
+cc Mark
Hi Dan,
Thanks for checking the static code warnings.
On Fri, Jul 13, 2012 at 14:32:20, Dan Carpenter wrote:
> Hello AnilKumar Ch,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch a7f1b63eb856: "regulator: tps65217: Add device tree
> support" from Jul 10, 2012, leads to the following Smatch complaint:
>
> drivers/mfd/tps65217.c:245 tps65217_probe()
> error: we previously assumed 'pdata' could be null (see line 205)
>
> drivers/mfd/tps65217.c
> 204
> 205 if (!pdata && client->dev.of_node)
> ^^^^^^
> New check.
!pdata in the above if condition is not required if we do a separate check for
"pdata == NULL". So removing pdata check from this and adding a separate
check for NULL pointer.
>
> 206 pdata = tps65217_parse_dt(client);
Above two lines will be replaced with these lines
if (client->dev.of_node)
pdata = tps65217_parse_dt(client);
if (!pdata) {
dev_err(&client->dev, "tps65217 requires platform data\n");
return -EINVAL;
}
I will submit a separate patch for this.
Thanks
AnilKumar
More information about the devicetree-discuss
mailing list