platform/x86: toshiba_bluetooth: Use more common error handling code in toshiba_bt_rfkill_probe()

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>
Link: https://patch.msgid.link/fa7a5865-6dda-4305-ab48-e0c9310520c8@web.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Markus Elfring 2026-06-17 10:50:15 +02:00 committed by Ilpo Järvinen
parent 4340038998
commit 71eb3db934
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31

View File

@ -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,