staging: vchiq: call unregister_chrdev_region() when driver registration fails
authorMarcelo Diop-Gonzalez <marcgonzalez@google.com>
Tue, 3 Dec 2019 15:39:21 +0000 (10:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 19:06:56 +0000 (20:06 +0100)
commit010d2f0afa7a9421b98d3aabe815b478c5a2be14
tree3d135c76d683d796e30ef3263f7fee3b24a62b7c
parent8155eefdc11a079fbb4ab79e9ade98d8c3c6c6bc
staging: vchiq: call unregister_chrdev_region() when driver registration fails

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@google.com>
Cc: stable <stable@vger.kernel.org>
Fixes: 187ac53e590c ("staging: vchiq_arm: rework probe and init functions")
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20191203153921.70540-1-marcgonzalez@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c