[PATCH] slimbus: qcom-ngd: Add check for platform_driver_register

Srinivas Kandagatla srinivas.kandagatla at linaro.org
Mon Dec 12 11:26:11 CET 2022



On 12/12/2022 09:49, Jiasheng Jiang wrote:
> Add the check for the return value of platform_driver_register
> in order to catch the exception.
> 
> Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver")
> Signed-off-by: Jiasheng Jiang <jiasheng at iscas.ac.cn>

Applied thanks,

--srini
> ---
>   drivers/slimbus/qcom-ngd-ctrl.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> index 76c5e446d243..c16fc9e6d1c6 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -1590,7 +1590,10 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
>   		goto err_pdr_lookup;
>   	}
>   
> -	platform_driver_register(&qcom_slim_ngd_driver);
> +	ret = platform_driver_register(&qcom_slim_ngd_driver);
> +	if (ret < 0)
> +		goto err_pdr_lookup; > +
>   	return of_qcom_slim_ngd_register(dev, ctrl);
>   
>   err_pdr_alloc:


More information about the Alsa-devel mailing list