All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Patch "bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()" has been added to the 5.10-stable tree
       [not found] <20230206134506.1652464-1-sashal@kernel.org>
@ 2023-02-06 16:13 ` Jernej Škrabec
  2023-02-07 11:13   ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jernej Škrabec @ 2023-02-06 16:13 UTC (permalink / raw)
  To: stable-commits, yuancan, Sasha Levin, stable
  Cc: Chen-Yu Tsai, Samuel Holland, Cezary Rojewski,
	Pierre-Louis Bossart, Liam Girdwood, Peter Ujfalusi, Bard Liao,
	Ranjani Sridharan, Kai Vehmanen, Mark Brown, Jaroslav Kysela,
	Takashi Iwai

Hi Sasha!

Dne ponedeljek, 06. februar 2023 ob 14:45:06 CET je Sasha Levin napisal(a):
> This is a note to let you know that I've just added the patch titled
> 
>     bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()
> 
> to the 5.10-stable tree which can be found at:
>    
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum
> mary
> 
> The filename of the patch is:
>      bus-sunxi-rsb-fix-error-handling-in-sunxi_rsb_init.patch
> and it can be found in the queue-5.10 subdirectory.
> 
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
> 
> 
> 
> commit ad954fdfb62b7541a93ce1a12da025a8f698d8a8
> Author: Yuan Can <yuancan@huawei.com>
> Date:   Wed Nov 23 09:42:00 2022 +0000
> 
>     bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()
> 
>     [ Upstream commit f71eaf2708be7831428eacae7db25d8ec6b8b4c5 ]
> 
>     The sunxi_rsb_init() returns the platform_driver_register() directly
>     without checking its return value, if platform_driver_register() failed,
> the sunxi_rsb_bus is not unregistered.
>     Fix by unregister sunxi_rsb_bus when platform_driver_register() failed.
> 
>     Fixes: d787dcdb9c8f ("bus: sunxi-rsb: Add driver for Allwinner Reduced
> Serial Bus") Signed-off-by: Yuan Can <yuancan@huawei.com>
>     Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
>     Link:
> https://lore.kernel.org/r/20221123094200.12036-1-yuancan@huawei.com
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
>     Signed-off-by: Sasha Levin <sashal@kernel.org>
> 
> diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
> index f8c29b888e6b..98cbb18f17fa 100644
> --- a/drivers/bus/sunxi-rsb.c
> +++ b/drivers/bus/sunxi-rsb.c
> @@ -781,7 +781,13 @@ static int __init sunxi_rsb_init(void)
>  		return ret;
>  	}
> 
> -	return platform_driver_register(&sunxi_rsb_driver);
> +	ret = platform_driver_register(&sunxi_rsb_driver);
> +	if (ret) {
> +		bus_unregister(&sunxi_rsb_bus);
> +		return ret;
> +	}
> +
> +	return 0;
>  }
>  module_init(sunxi_rsb_init);
> 
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c
> b/sound/soc/intel/boards/bytcr_rt5651.c index bf8b87d45cb0..2c76f0abeeca
> 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -918,7 +918,6 @@ static int snd_byt_rt5651_mc_probe(struct
> platform_device *pdev) if (adev) {
>  		snprintf(byt_rt5651_codec_name, 
sizeof(byt_rt5651_codec_name),
>  			 "i2c-%s", acpi_dev_name(adev));
> -		put_device(&adev->dev);
>  		byt_rt5651_dais[dai_index].codecs->name = 
byt_rt5651_codec_name;
>  	} else {
>  		dev_err(&pdev->dev, "Error cannot find '%s' dev\n", 
mach->id);
> @@ -927,6 +926,7 @@ static int snd_byt_rt5651_mc_probe(struct
> platform_device *pdev)
> 
>  	codec_dev = bus_find_device_by_name(&i2c_bus_type, NULL,
>  					    
byt_rt5651_codec_name);
> +	acpi_dev_put(adev);
>  	if (!codec_dev)
>  		return -EPROBE_DEFER;

Above bytcr_rt5651.c changes are unrelated to original commit. Did you merge 
two commits by mistake?

Best regards,
Jernej





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch "bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()" has been added to the 5.10-stable tree
  2023-02-06 16:13 ` Patch "bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()" has been added to the 5.10-stable tree Jernej Škrabec
@ 2023-02-07 11:13   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2023-02-07 11:13 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: stable-commits, yuancan, Sasha Levin, stable, Chen-Yu Tsai,
	Samuel Holland, Cezary Rojewski, Pierre-Louis Bossart,
	Liam Girdwood, Peter Ujfalusi, Bard Liao, Ranjani Sridharan,
	Kai Vehmanen, Mark Brown, Jaroslav Kysela, Takashi Iwai

On Mon, Feb 06, 2023 at 05:13:49PM +0100, Jernej Škrabec wrote:
> Hi Sasha!
> 
> Dne ponedeljek, 06. februar 2023 ob 14:45:06 CET je Sasha Levin napisal(a):
> > This is a note to let you know that I've just added the patch titled
> > 
> >     bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()
> > 
> > to the 5.10-stable tree which can be found at:
> >    
> > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum
> > mary
> > 
> > The filename of the patch is:
> >      bus-sunxi-rsb-fix-error-handling-in-sunxi_rsb_init.patch
> > and it can be found in the queue-5.10 subdirectory.
> > 
> > If you, or anyone else, feels it should not be added to the stable tree,
> > please let <stable@vger.kernel.org> know about it.
> > 
> > 
> > 
> > commit ad954fdfb62b7541a93ce1a12da025a8f698d8a8
> > Author: Yuan Can <yuancan@huawei.com>
> > Date:   Wed Nov 23 09:42:00 2022 +0000
> > 
> >     bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()
> > 
> >     [ Upstream commit f71eaf2708be7831428eacae7db25d8ec6b8b4c5 ]
> > 
> >     The sunxi_rsb_init() returns the platform_driver_register() directly
> >     without checking its return value, if platform_driver_register() failed,
> > the sunxi_rsb_bus is not unregistered.
> >     Fix by unregister sunxi_rsb_bus when platform_driver_register() failed.
> > 
> >     Fixes: d787dcdb9c8f ("bus: sunxi-rsb: Add driver for Allwinner Reduced
> > Serial Bus") Signed-off-by: Yuan Can <yuancan@huawei.com>
> >     Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> >     Link:
> > https://lore.kernel.org/r/20221123094200.12036-1-yuancan@huawei.com
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> >     Signed-off-by: Sasha Levin <sashal@kernel.org>
> > 
> > diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
> > index f8c29b888e6b..98cbb18f17fa 100644
> > --- a/drivers/bus/sunxi-rsb.c
> > +++ b/drivers/bus/sunxi-rsb.c
> > @@ -781,7 +781,13 @@ static int __init sunxi_rsb_init(void)
> >  		return ret;
> >  	}
> > 
> > -	return platform_driver_register(&sunxi_rsb_driver);
> > +	ret = platform_driver_register(&sunxi_rsb_driver);
> > +	if (ret) {
> > +		bus_unregister(&sunxi_rsb_bus);
> > +		return ret;
> > +	}
> > +
> > +	return 0;
> >  }
> >  module_init(sunxi_rsb_init);
> > 
> > diff --git a/sound/soc/intel/boards/bytcr_rt5651.c
> > b/sound/soc/intel/boards/bytcr_rt5651.c index bf8b87d45cb0..2c76f0abeeca
> > 100644
> > --- a/sound/soc/intel/boards/bytcr_rt5651.c
> > +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> > @@ -918,7 +918,6 @@ static int snd_byt_rt5651_mc_probe(struct
> > platform_device *pdev) if (adev) {
> >  		snprintf(byt_rt5651_codec_name, 
> sizeof(byt_rt5651_codec_name),
> >  			 "i2c-%s", acpi_dev_name(adev));
> > -		put_device(&adev->dev);
> >  		byt_rt5651_dais[dai_index].codecs->name = 
> byt_rt5651_codec_name;
> >  	} else {
> >  		dev_err(&pdev->dev, "Error cannot find '%s' dev\n", 
> mach->id);
> > @@ -927,6 +926,7 @@ static int snd_byt_rt5651_mc_probe(struct
> > platform_device *pdev)
> > 
> >  	codec_dev = bus_find_device_by_name(&i2c_bus_type, NULL,
> >  					    
> byt_rt5651_codec_name);
> > +	acpi_dev_put(adev);
> >  	if (!codec_dev)
> >  		return -EPROBE_DEFER;
> 
> Above bytcr_rt5651.c changes are unrelated to original commit. Did you merge 
> two commits by mistake?

Yes, something went wrong, I've dropped that chunk now.

thanks for the review!

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-07 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230206134506.1652464-1-sashal@kernel.org>
2023-02-06 16:13 ` Patch "bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()" has been added to the 5.10-stable tree Jernej Škrabec
2023-02-07 11:13   ` Greg KH

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.