public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: vc04_services: Fix an error code in vchiq_probe()
@ 2019-03-25  8:56 Dan Carpenter
  2019-03-25  9:04 ` Stefan Wahren
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-03-25  8:56 UTC (permalink / raw)
  To: kernel-janitors

We need to set "err" on this error path.

Fixes: 187ac53e590c ("staging: vchiq_arm: rework probe and init functions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 804daf83be35..064d0db4c51e 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3513,6 +3513,7 @@ static int vchiq_probe(struct platform_device *pdev)
 	struct device_node *fw_node;
 	const struct of_device_id *of_id;
 	struct vchiq_drvdata *drvdata;
+	struct device *vchiq_dev;
 	int err;
 
 	of_id = of_match_node(vchiq_of_match, pdev->dev.of_node);
@@ -3547,9 +3548,12 @@ static int vchiq_probe(struct platform_device *pdev)
 		goto failed_platform_init;
 	}
 
-	if (IS_ERR(device_create(vchiq_class, &pdev->dev, vchiq_devid,
-				 NULL, "vchiq")))
+	vchiq_dev = device_create(vchiq_class, &pdev->dev, vchiq_devid, NULL,
+				  "vchiq");
+	if (IS_ERR(vchiq_dev)) {
+		err = PTR_ERR(vchiq_dev);
 		goto failed_device_create;
+	}
 
 	vchiq_debugfs_init();
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: vc04_services: Fix an error code in vchiq_probe()
  2019-03-25  8:56 [PATCH] staging: vc04_services: Fix an error code in vchiq_probe() Dan Carpenter
@ 2019-03-25  9:04 ` Stefan Wahren
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Wahren @ 2019-03-25  9:04 UTC (permalink / raw)
  To: kernel-janitors

Am 25.03.19 um 09:56 schrieb Dan Carpenter:
> We need to set "err" on this error path.
>
> Fixes: 187ac53e590c ("staging: vchiq_arm: rework probe and init functions")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-25  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-25  8:56 [PATCH] staging: vc04_services: Fix an error code in vchiq_probe() Dan Carpenter
2019-03-25  9:04 ` Stefan Wahren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox