[PATCH 1/1] regulator: gpio-regulator: fix crash when no states property in dt
Mark Brown
broonie at opensource.wolfsonmicro.com
Fri Nov 9 11:56:09 EST 2012
On Fri, Nov 09, 2012 at 04:34:36PM +0800, Frank Li wrote:
> /* Fetch states. */
> prop = of_find_property(np, "states", NULL);
> - proplen = prop->length / sizeof(int);
> + proplen = prop ? prop->length / sizeof(int) : 0;
Aren't states mandatory for this driver, in which case shouldn't the
probe fail here?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121109/32576d25/attachment.sig>
More information about the linux-arm-kernel
mailing list