mirror of
https://github.com/torvalds/linux.git
synced 2025-11-02 09:40:27 +02:00
misc: fastrpc: Add meaningful labels for exit paths
In the fastrpc_rpmsg_probe function, the exit path labels are not intuitive and do not clearly indicate the purpose of the goto statements. Rename goto labels to make it more intuitive and to align with labels of other functions. Signed-off-by: Anandu Krishnan E <quic_anane@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20250310085417.25559-1-quic_anane@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0af2f6be1b
commit
fc788c4068
1 changed files with 8 additions and 8 deletions
|
|
@ -2313,7 +2313,7 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
|
||||||
rmem = of_reserved_mem_lookup(rmem_node);
|
rmem = of_reserved_mem_lookup(rmem_node);
|
||||||
if (!rmem) {
|
if (!rmem) {
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto fdev_error;
|
goto err_free_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
src_perms = BIT(QCOM_SCM_VMID_HLOS);
|
src_perms = BIT(QCOM_SCM_VMID_HLOS);
|
||||||
|
|
@ -2334,7 +2334,7 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
|
||||||
data->unsigned_support = false;
|
data->unsigned_support = false;
|
||||||
err = fastrpc_device_register(rdev, data, secure_dsp, domains[domain_id]);
|
err = fastrpc_device_register(rdev, data, secure_dsp, domains[domain_id]);
|
||||||
if (err)
|
if (err)
|
||||||
goto fdev_error;
|
goto err_free_data;
|
||||||
break;
|
break;
|
||||||
case CDSP_DOMAIN_ID:
|
case CDSP_DOMAIN_ID:
|
||||||
case CDSP1_DOMAIN_ID:
|
case CDSP1_DOMAIN_ID:
|
||||||
|
|
@ -2342,15 +2342,15 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
|
||||||
/* Create both device nodes so that we can allow both Signed and Unsigned PD */
|
/* Create both device nodes so that we can allow both Signed and Unsigned PD */
|
||||||
err = fastrpc_device_register(rdev, data, true, domains[domain_id]);
|
err = fastrpc_device_register(rdev, data, true, domains[domain_id]);
|
||||||
if (err)
|
if (err)
|
||||||
goto fdev_error;
|
goto err_free_data;
|
||||||
|
|
||||||
err = fastrpc_device_register(rdev, data, false, domains[domain_id]);
|
err = fastrpc_device_register(rdev, data, false, domains[domain_id]);
|
||||||
if (err)
|
if (err)
|
||||||
goto populate_error;
|
goto err_deregister_fdev;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto fdev_error;
|
goto err_free_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
kref_init(&data->refcount);
|
kref_init(&data->refcount);
|
||||||
|
|
@ -2367,17 +2367,17 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
|
||||||
|
|
||||||
err = of_platform_populate(rdev->of_node, NULL, NULL, rdev);
|
err = of_platform_populate(rdev->of_node, NULL, NULL, rdev);
|
||||||
if (err)
|
if (err)
|
||||||
goto populate_error;
|
goto err_deregister_fdev;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
populate_error:
|
err_deregister_fdev:
|
||||||
if (data->fdevice)
|
if (data->fdevice)
|
||||||
misc_deregister(&data->fdevice->miscdev);
|
misc_deregister(&data->fdevice->miscdev);
|
||||||
if (data->secure_fdevice)
|
if (data->secure_fdevice)
|
||||||
misc_deregister(&data->secure_fdevice->miscdev);
|
misc_deregister(&data->secure_fdevice->miscdev);
|
||||||
|
|
||||||
fdev_error:
|
err_free_data:
|
||||||
kfree(data);
|
kfree(data);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue