All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de,
	ed.blake@sondrel.com, linux-pwm@vger.kernel.org, wigyori@uid0.hu
Subject: Re: [PATCH] pwm: img: Fix null pointer access in probe
Date: Wed, 19 Aug 2020 11:39:01 +0100	[thread overview]
Message-ID: <20200819103901.GF4354@dell> (raw)
In-Reply-To: <20200815163115.11376-1-hauke@hauke-m.de>

On Sat, 15 Aug 2020, Hauke Mehrtens wrote:

> dev_get_drvdata() is called in img_pwm_runtime_resume() before the
> driver data is set.
> When pm_runtime_enabled() returns false in img_pwm_probe() it calls
> img_pwm_runtime_resume() which results in a null pointer access.
> 
> This patch fixes the problem by setting the driver data earlier in the
> img_pwm_probe() function.
> 
> Fixes: e690ae526216 ("pwm: img: Add runtime PM")
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
>  drivers/pwm/pwm-img.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Looks fine.

Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2020-08-19 10:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-15 16:31 [PATCH] pwm: img: Fix null pointer access in probe Hauke Mehrtens
2020-08-19 10:39 ` Lee Jones [this message]
2020-08-20 13:02 ` Uwe Kleine-König
2020-08-20 16:16   ` Hauke Mehrtens

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=20200819103901.GF4354@dell \
    --to=lee.jones@linaro.org \
    --cc=ed.blake@sondrel.com \
    --cc=hauke@hauke-m.de \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wigyori@uid0.hu \
    /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.