From: Alexey Khoroshilov Date: Fri, 11 Dec 2015 20:24:10 +0000 (+0300) Subject: nfit: acpi_nfit_notify(): Do not leave device locked X-Git-Tag: v4.1.12-92~18^2^2~53 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8e71d09d632d72c1f8cc9c9daf4e70ceda982efd;p=users%2Fjedix%2Flinux-maple.git nfit: acpi_nfit_notify(): Do not leave device locked 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 Reviewed-by: Ross Zwisler Reviewed-by: Vishal Verma Signed-off-by: Dan Williams (cherry picked from commit d91e892825ae6f0ed4f8b07ae5d348eff86ab2ea) Signed-off-by: Dan Duval --- diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c index f00f291320f0..7e099bc14528 100644 --- a/drivers/acpi/nfit.c +++ b/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) {