RE: [PATCH] gpio: Fix wrong pointer type in pca953x

From: Eibach, Dirk
Date: Tue Feb 22 2011 - 07:54:25 EST




> > struct pca953x_platform_data *pdata;
> > struct device_node *node;
> > - const uint16_t *val;
> > + const u32 *val;
> >
>
> This should probably be signed? We compare it against zero later on.
>
> if (*val < 0)
> dev_warn(&client->dev,
> "invalid gpio-base in device
> tree\n");

Good catch.
of property values are generally unsigned. The whole check is bogus
here. Will supply updated patch later.

> regards,
> dan carpenter

Cheers
Dirk


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/