On Fri, Dec 11, 2015 at 11:24:10PM +0300, Alexey Khoroshilov wrote:
> 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 <khoroshi...@ispras.ru>
> ---
>  drivers/acpi/nfit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> index e7ed39bab97d..aa45d4802707 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) {

This seems correct to me.  Thanks for the patch.

Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to