\

On Tue, Nov 1, 2016 at 4:25 PM, Johan Hovold <jo...@kernel.org> wrote:
>
> Make sure to drop the device reference taken by of_find_device_by_node()
> before returning from arche_platform_change_state().
>
> Note that this code is expected to be removed, but let's fix up the leak
> nonetheless.
>
> Fixes: 886aba558b9e ("greybus: arche-platform: Export fn to allow...")
> Signed-off-by: Johan Hovold <jo...@kernel.org>
> ---
>  drivers/staging/greybus/arche-platform.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/greybus/arche-platform.c 
> b/drivers/staging/greybus/arche-platform.c
> index 34307ac3f255..d33d6fe078ad 100644
> --- a/drivers/staging/greybus/arche-platform.c
> +++ b/drivers/staging/greybus/arche-platform.c
> @@ -186,6 +186,7 @@ int arche_platform_change_state(enum arche_platform_state 
> state,
>  exit:
>         spin_unlock_irqrestore(&arche_pdata->wake_lock, flags);
>         mutex_unlock(&arche_pdata->platform_state_mutex);
> +       put_device(&pdev->dev);
>         of_node_put(np);
>         return ret;
>  }
> --
> 2.7.3
>


Thanks for the fix Johan.

Reviewed-and-Acked-by: Vaibhav Hiremath <hvaibhav.li...@gmail.com>

Thanks,
Vaibhav
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to