diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-03-25 04:56:59 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-25 16:54:18 -0400 |
| commit | 9b9c87cf51783cbe7140c51472762094033cfeab (patch) | |
| tree | 9dea5314883cf1ea964e13514b2a06051e93b5ee | |
| parent | b6391ac73400eff38377a4a7364bd3df5efb5178 (diff) | |
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 <dan.carpenter@oracle.com>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 8 |
1 files 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) | |||
| 3513 | struct device_node *fw_node; | 3513 | struct device_node *fw_node; |
| 3514 | const struct of_device_id *of_id; | 3514 | const struct of_device_id *of_id; |
| 3515 | struct vchiq_drvdata *drvdata; | 3515 | struct vchiq_drvdata *drvdata; |
| 3516 | struct device *vchiq_dev; | ||
| 3516 | int err; | 3517 | int err; |
| 3517 | 3518 | ||
| 3518 | of_id = of_match_node(vchiq_of_match, pdev->dev.of_node); | 3519 | of_id = of_match_node(vchiq_of_match, pdev->dev.of_node); |
| @@ -3547,9 +3548,12 @@ static int vchiq_probe(struct platform_device *pdev) | |||
| 3547 | goto failed_platform_init; | 3548 | goto failed_platform_init; |
| 3548 | } | 3549 | } |
| 3549 | 3550 | ||
| 3550 | if (IS_ERR(device_create(vchiq_class, &pdev->dev, vchiq_devid, | 3551 | vchiq_dev = device_create(vchiq_class, &pdev->dev, vchiq_devid, NULL, |
| 3551 | NULL, "vchiq"))) | 3552 | "vchiq"); |
| 3553 | if (IS_ERR(vchiq_dev)) { | ||
| 3554 | err = PTR_ERR(vchiq_dev); | ||
| 3552 | goto failed_device_create; | 3555 | goto failed_device_create; |
| 3556 | } | ||
| 3553 | 3557 | ||
| 3554 | vchiq_debugfs_init(); | 3558 | vchiq_debugfs_init(); |
| 3555 | 3559 | ||
