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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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

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:



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux