nfit: acpi_nfit_notify(): Do not leave device locked
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 11 Dec 2015 20:24:10 +0000 (23:24 +0300)
committerDan Williams <dan.j.williams@intel.com>
Fri, 11 Dec 2015 22:24:26 +0000 (14:24 -0800)
Even if dev->driver is null because we are being removed,
it is safer to not leave device locked.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit.c

index e7ed39bab97d5d0a97d03919bd615eb5fba4105e..aa45d480270721280a9e8085574a14d086a079fc 100644 (file)
@@ -1810,7 +1810,7 @@ static void acpi_nfit_notify(struct acpi_device *adev, u32 event)
        if (!dev->driver) {
                /* dev->driver may be null if we're being removed */
                dev_dbg(dev, "%s: no driver found for dev\n", __func__);
-               return;
+               goto out_unlock;
        }
 
        if (!acpi_desc) {