Эх сурвалжийг харах

nfit: acpi_nfit_notify(): Do not leave device locked

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>
Alexey Khoroshilov 9 жил өмнө
parent
commit
d91e892825
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      drivers/acpi/nfit.c

+ 1 - 1
drivers/acpi/nfit.c

@@ -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) {