aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Diop-Gonzalez <[email protected]>2019-12-03 10:39:21 -0500
committerGreg Kroah-Hartman <[email protected]>2019-12-10 10:56:56 +0100
commitd2cdb20507fe2079a146459f9718b45d78cbbe61 (patch)
treec4f25c358cb70cbbed8a3a330c09cd378402725b
parent1af73a25e6e7d9f2f1e2a14259cc9ffce6d8f6d4 (diff)
staging: vchiq: call unregister_chrdev_region() when driver registration fails
This undoes the previous call to alloc_chrdev_region() on failure, and is probably what was meant originally given the label name. Signed-off-by: Marcelo Diop-Gonzalez <[email protected]> Cc: stable <[email protected]> Fixes: 187ac53e590c ("staging: vchiq_arm: rework probe and init functions") Reviewed-by: Dan Carpenter <[email protected]> Reviewed-by: Nicolas Saenz Julienne <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c2
1 files changed, 1 insertions, 1 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 02148a24818a..4458c1e60fa3 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3309,7 +3309,7 @@ static int __init vchiq_driver_init(void)
return 0;
region_unregister:
- platform_driver_unregister(&vchiq_driver);
+ unregister_chrdev_region(vchiq_devid, 1);
class_destroy:
class_destroy(vchiq_class);