From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Ioana Ciornei" <ioana.ciornei@nxp.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bus: fsl-mc: Cope for unbound devices in fsl_mc_shutdown
Date: Tue, 9 Dec 2025 13:05:50 +0100 [thread overview]
Message-ID: <c51882f6-500d-481f-adf3-c257fb7ea47a@kernel.org> (raw)
In-Reply-To: <20251209115950.3382308-2-u.kleine-koenig@baylibre.com>
Le 09/12/2025 à 12:59, Uwe Kleine-König a écrit :
> Other than a driver's shutdown callback the bus shutdown callback is
> also called for unbound drivers. So check for the device being bound
> before following the pointer to its driver.
>
> Fixes: ef980bda574d ("bus: fsl-mc: Convert to bus callbacks")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
> Hello,
>
> I pointed out this issue a few days ago in the thread that resulted in
> commit ef980bda574d, but didn't receive a reaction so far. Given that
> ef980bda574d is contained in next, I guess it's time for a proper patch
> to fix the issue. Here it is.
Thanks for the fixup.
Nobody reacted against what you pointed out a few days ago so I guess
this fix is OK.
Unless you mind I will squash it into previous patch to avoid having to
manage the Fixes: tag update when I rebase to 6.19rc1
Christophe
>
> Best regards
> Uwe
>
> drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
> index 6bc163d2ca49..c08c04047ae2 100644
> --- a/drivers/bus/fsl-mc/fsl-mc-bus.c
> +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
> @@ -162,7 +162,7 @@ static void fsl_mc_shutdown(struct device *dev)
> struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(dev->driver);
> struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
>
> - if (mc_drv->shutdown)
> + if (dev->driver && mc_drv->shutdown)
> mc_drv->shutdown(mc_dev);
> }
>
>
> base-commit: ef980bda574d3a2ebaa297def62f03d2222e6ef3
next prev parent reply other threads:[~2025-12-09 12:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 11:59 [PATCH] bus: fsl-mc: Cope for unbound devices in fsl_mc_shutdown Uwe Kleine-König
2025-12-09 12:05 ` Christophe Leroy (CS GROUP) [this message]
2025-12-09 14:44 ` Uwe Kleine-König
2025-12-15 18:04 ` Christophe Leroy (CS GROUP)
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=c51882f6-500d-481f-adf3-c257fb7ea47a@kernel.org \
--to=chleroy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=ioana.ciornei@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=u.kleine-koenig@baylibre.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox