From: broonie@opensource•wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 1/1] regulator: gpio-regulator: fix crash when no states property in dt
Date: Fri, 9 Nov 2012 16:56:09 +0000 [thread overview]
Message-ID: <20121109165609.GV23807@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1352450076-22682-1-git-send-email-Frank.Li@freescale.com>
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>
next prev parent reply other threads:[~2012-11-09 16:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 8:34 [PATCH 1/1] regulator: gpio-regulator: fix crash when no states property in dt Frank Li
2012-11-09 16:56 ` Mark Brown [this message]
2012-11-12 1:56 ` Frank Li
2012-11-13 7:57 ` Mark Brown
2012-11-13 8:12 ` Frank Li
2012-11-13 8:17 ` Mark Brown
2012-11-14 9:36 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121109165609.GV23807@opensource.wolfsonmicro.com \
--to=broonie@opensource$(echo .)wolfsonmicro.com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox