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%3Ba=su... 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));
byt_rt5651_dais[dai_index].codecs->name =put_device(&adev->dev);
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
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%3Ba=su... 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));
byt_rt5651_dais[dai_index].codecs->name =put_device(&adev->dev);
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
linux-stable-mirror@lists.linaro.org