Skip to content

Commit 9b9c87c

Browse files
Dan Carpentergregkh
authored andcommitted
staging: vc04_services: Fix an error code in vchiq_probe()
We need to set "err" on this error path. Fixes: 187ac53 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b6391ac commit 9b9c87c

File tree

1 file changed

+6
-2
lines changed
  • drivers/staging/vc04_services/interface/vchiq_arm

1 file changed

+6
-2
lines changed

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3513,6 +3513,7 @@ static int vchiq_probe(struct platform_device *pdev)
35133513
struct device_node *fw_node;
35143514
const struct of_device_id *of_id;
35153515
struct vchiq_drvdata *drvdata;
3516+
struct device *vchiq_dev;
35163517
int err;
35173518

35183519
of_id = of_match_node(vchiq_of_match, pdev->dev.of_node);
@@ -3547,9 +3548,12 @@ static int vchiq_probe(struct platform_device *pdev)
35473548
goto failed_platform_init;
35483549
}
35493550

3550-
if (IS_ERR(device_create(vchiq_class, &pdev->dev, vchiq_devid,
3551-
NULL, "vchiq")))
3551+
vchiq_dev = device_create(vchiq_class, &pdev->dev, vchiq_devid, NULL,
3552+
"vchiq");
3553+
if (IS_ERR(vchiq_dev)) {
3554+
err = PTR_ERR(vchiq_dev);
35523555
goto failed_device_create;
3556+
}
35533557

35543558
vchiq_debugfs_init();
35553559

0 commit comments

Comments
 (0)