Commit d91e8928 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Dan Williams
Browse files

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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: default avatarVishal Verma <vishal.l.verma@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 527e9316
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {