From: Lee Jones <lee.jones@linaro.org>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org,
patches@opensource.wolfsonmicro.com,
Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH] mfd: wm831x: Fix possible NULL pointer dereference
Date: Sun, 20 Sep 2015 05:18:01 +0100 [thread overview]
Message-ID: <20150920041801.GM3039@x1> (raw)
In-Reply-To: <1442221676-26647-1-git-send-email-javier@osg.samsung.com>
On Mon, 14 Sep 2015, Javier Martinez Canillas wrote:
> The driver always checks for pdata being NULL expect in one place.
> Add a check to prevent a possible NULL pointer deference error.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
> drivers/mfd/wm831x-core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Applied, thanks.
NB: I'll also try to remember to fix-up the spelling error in the
commit log.
> diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c
> index 28366a90e1ad..3e0e99ec5836 100644
> --- a/drivers/mfd/wm831x-core.c
> +++ b/drivers/mfd/wm831x-core.c
> @@ -1626,7 +1626,9 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
> mutex_init(&wm831x->io_lock);
> mutex_init(&wm831x->key_lock);
> dev_set_drvdata(wm831x->dev, wm831x);
> - wm831x->soft_shutdown = pdata->soft_shutdown;
> +
> + if (pdata)
> + wm831x->soft_shutdown = pdata->soft_shutdown;
>
> ret = wm831x_reg_read(wm831x, WM831X_PARENT_ID);
> if (ret < 0) {
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2015-09-20 4:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 9:07 [PATCH] mfd: wm831x: Fix possible NULL pointer dereference Javier Martinez Canillas
2015-09-14 9:08 ` Charles Keepax
2015-09-20 4:18 ` Lee Jones [this message]
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=20150920041801.GM3039@x1 \
--to=lee.jones@linaro.org \
--cc=javier@osg.samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.