Linux Power Management development
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Ulf Hansson <ulfh@kernel.org>, Chen-Yu Tsai <wens@kernel.org>,
	Samuel Holland <samuel@sholland.org>,
	Alastair D'Silva <alastair@d-silva.org>
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev,
	Alastair D'Silva <alastair@d-silva.org>
Subject: Re: [PATCH] pmdomain: sunxi: pck600: Initialize pd->pck in probe
Date: Sat, 28 Nov 2026 18:25:59 +0100	[thread overview]
Message-ID: <M_-Hi7UNTRSu4uxAGeGpEA@gmail.com> (raw)
In-Reply-To: <20261127080625.1982574-1-alastair@d-silva.org>

Dne petek, 27. november 2026 ob 09:06:25 Srednjeevropski standardni čas je Alastair D'Silva napisal(a):
> sunxi_pck600_pd_set_power() dereferences pd->pck->dev on timeout.
> sunxi_pck600_probe() never sets pd->pck, causing a NULL dereference.
> 
> Assign pd->pck = pck during probe.
> 
> Fixes: 76e4310115ca ("pmdomain: sunxi: add driver for Allwinner A523's PCK-600 power controller")
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  drivers/pmdomain/sunxi/sun55i-pck600.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pmdomain/sunxi/sun55i-pck600.c b/drivers/pmdomain/sunxi/sun55i-pck600.c
> index 81c3b18a38a4..46632278b8f4 100644
> --- a/drivers/pmdomain/sunxi/sun55i-pck600.c
> +++ b/drivers/pmdomain/sunxi/sun55i-pck600.c
> @@ -175,6 +175,7 @@ static int sunxi_pck600_probe(struct platform_device *pdev)
>  		pd->genpd.power_off = sunxi_pck600_power_off;
>  		pd->genpd.power_on = sunxi_pck600_power_on;
>  		pd->genpd.flags = pd_desc->flags;
> +		pd->pck = pck;
>  		pd->base = base + PPU_REG_SIZE * i;
>  
>  		sunxi_pck600_pd_setup(pd, desc);
> 





      reply	other threads:[~2026-11-28 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  8:06 [PATCH] pmdomain: sunxi: pck600: Initialize pd->pck in probe Alastair D'Silva
2026-11-28 17:25 ` Jernej Škrabec [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=M_-Hi7UNTRSu4uxAGeGpEA@gmail.com \
    --to=jernej.skrabec@gmail.com \
    --cc=alastair@d-silva.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=samuel@sholland.org \
    --cc=ulfh@kernel.org \
    --cc=wens@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox