From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C065E2E091B for ; Tue, 9 Dec 2025 12:05:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765281955; cv=none; b=jgZm/1ZmduhZDZ+GVAArqNnZ1hAcK3ikz8CjhHXfddHWIQc+i5N5Z/A0mSz7Tw72HqehurWgnRB064/fOYYfHVF7pR/gQrz/tXIj+UrZcsD55lTFAbveawa4EF4TwAgNRX1x9Ud4pb0myh2SZfy0yohoF6AQ2uty4sKvNsRolN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765281955; c=relaxed/simple; bh=X2u9zZxh+1rv+/IM29w/6M1Ga67FE5iZdik7P6+xoUM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AV85LB9tBdaimba5nA2EdkxIP8AgrEljO5S6SgAeRJSfqbkfKlJwaQVZr9RZArEOD4wFNDgR4JkHx2zQGmZ6LkKw8vwLLDdxliA+cOZxS6lXhIhZBAX1tXaeGnivo9Ps5S9b6Szh+DV/7fn42WayvqciFF8pIGQROdeQhDH+bks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fcg1gMJk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fcg1gMJk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60F50C4CEF5; Tue, 9 Dec 2025 12:05:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765281955; bh=X2u9zZxh+1rv+/IM29w/6M1Ga67FE5iZdik7P6+xoUM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=fcg1gMJkgulL+QmYHsePZCrmmDYCmK+lvtL+YQbGlg+O8wNvDoiABrGCuH0cKrowp luJ1qATscGqIc/vH8msAeLI8EfT6/2tMMlfVa70PJDCh9TzxaUaUqhNja/Oe7qQ/Dn 2/YIr/so/u0GflsJaoXRbzUGtkjx++KjDqjE9+v2odR38qwRtM2WMlpz5ShXGH5UYs WsDbopDyc4LhIuOBfFMXHCfCfB8M3NmcZDvN1Pgz9OPs0MIxNFTMudBJj6VpuoKObO YLxWs1xzRylojfHDRZxW2qeGYY/phqhx0+u4can1X2XdFRgGJsRppFcYhazVqwSXWC +pp4XTeg9AmTw== Message-ID: Date: Tue, 9 Dec 2025 13:05:50 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] bus: fsl-mc: Cope for unbound devices in fsl_mc_shutdown To: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Ioana Ciornei Cc: Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20251209115950.3382308-2-u.kleine-koenig@baylibre.com> Content-Language: fr-FR From: "Christophe Leroy (CS GROUP)" In-Reply-To: <20251209115950.3382308-2-u.kleine-koenig@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 > --- > 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