]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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 Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:25:25 +0000 (12:25 -0500)
Orabug: 22913653

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>
(cherry picked from commit d91e892825ae6f0ed4f8b07ae5d348eff86ab2ea)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/acpi/nfit.c

index f00f291320f0498a92f9f57fe15786273d31745b..7e099bc14528adb759da2cacc7ec469f941a3e88 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) {