staging: vc04_services: Fix an error code in vchiq_probe()
Subsystems (3)
PATCH 1/1 staging: vc04_services: Fix an error code in vchiq_probe()
We need to set "err" on this error path.
Fixes 187ac53e590c ("staging: vchiq_arm: rework probe and init functions")
Signed-off-by Dan Carpenter <[email protected]>
--- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +6 -2
@@ -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 ();
Signature · 1 line
2.17.1
Am 25.03.19 um 09:56 schrieb Dan Carpenter:
Quoted 4 lines
We need to set "err" on this error path.
Fixes 187ac53e590c ("staging: vchiq_arm: rework probe and init functions")Signed-off-by Dan Carpenter <[email protected]>
Acked-by Stefan Wahren <[email protected]>
Thanks