* [PATCH] platform/x86: toshiba_bluetooth: Use more common error handling code in toshiba_bt_rfkill_probe()
@ 2026-06-17 9:06 Markus Elfring
2026-07-01 14:11 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2026-06-17 9:06 UTC (permalink / raw)
To: platform-driver-x86, Azael Avalos, Darren Hart, Hans de Goede,
Ilpo Järvinen, Rafael J. Wysocki
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 17 Jun 2026 10:50:15 +0200
Use an existing label once more so that a bit of exception handling can be
better reused at the end of this function implementation.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/platform/x86/toshiba_bluetooth.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/toshiba_bluetooth.c b/drivers/platform/x86/toshiba_bluetooth.c
index e00abba58c7c..bf199fba4999 100644
--- a/drivers/platform/x86/toshiba_bluetooth.c
+++ b/drivers/platform/x86/toshiba_bluetooth.c
@@ -252,10 +252,8 @@ static int toshiba_bt_rfkill_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, bt_dev);
result = toshiba_bluetooth_sync_status(bt_dev);
- if (result) {
- kfree(bt_dev);
- return result;
- }
+ if (result)
+ goto err_free_bt_dev;
bt_dev->rfk = rfkill_alloc("Toshiba Bluetooth",
&pdev->dev,
--
2.54.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] platform/x86: toshiba_bluetooth: Use more common error handling code in toshiba_bt_rfkill_probe()
2026-06-17 9:06 [PATCH] platform/x86: toshiba_bluetooth: Use more common error handling code in toshiba_bt_rfkill_probe() Markus Elfring
@ 2026-07-01 14:11 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2026-07-01 14:11 UTC (permalink / raw)
To: platform-driver-x86, Azael Avalos, Darren Hart, Hans de Goede,
Rafael J. Wysocki, Markus Elfring
Cc: LKML, kernel-janitors
On Wed, 17 Jun 2026 11:06:52 +0200, Markus Elfring wrote:
> Use an existing label once more so that a bit of exception handling can be
> better reused at the end of this function implementation.
>
> This issue was detected by using the Coccinelle software.
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent or clearly a regression fix.
The list of commits applied:
[1/1] platform/x86: toshiba_bluetooth: Use more common error handling code in toshiba_bt_rfkill_probe()
commit: f3aaddb8a085eda92d4c9792e031ead8237f79aa
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-01 14:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-17 9:06 [PATCH] platform/x86: toshiba_bluetooth: Use more common error handling code in toshiba_bt_rfkill_probe() Markus Elfring
2026-07-01 14:11 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox