mirror of
https://github.com/torvalds/linux.git
synced 2026-09-28 20:12:01 +02:00
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:
parent
4340038998
commit
71eb3db934
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user