[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191216174809.364995446@linuxfoundation.org>
Date: Mon, 16 Dec 2019 18:47:36 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Marcelo Diop-Gonzalez <marcgonzalez@...gle.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
Subject: [PATCH 5.3 016/180] staging: vchiq: call unregister_chrdev_region() when driver registration fails
From: Marcelo Diop-Gonzalez <marcgonzalez@...gle.com>
commit d2cdb20507fe2079a146459f9718b45d78cbbe61 upstream.
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 <marcgonzalez@...gle.com>
Cc: stable <stable@...r.kernel.org>
Fixes: 187ac53e590c ("staging: vchiq_arm: rework probe and init functions")
Reviewed-by: Dan Carpenter <dan.carpenter@...cle.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
Link: https://lore.kernel.org/r/20191203153921.70540-1-marcgonzalez@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3300,7 +3300,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);
Powered by blists - more mailing lists