Re: [RESEND PATCH] mux: core: fix double get_device()
From: Greg Kroah-Hartman
Date: Tue Jan 09 2018 - 05:28:38 EST
On Mon, Jan 08, 2018 at 07:19:52PM +0100, Peter Rosin wrote:
> From: Hans de Goede <hdegoede@xxxxxxxxxx>
>
> class_find_device already does a get_device on the returned device.
> So the device returned by of_find_mux_chip_by_node is already referenced
> and we should not reference it again (and unref it on error).
>
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> Signed-off-by: Peter Rosin <peda@xxxxxxxxxx>
> ---
> drivers/mux/core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> Hi Greg,
>
> Perhaps this was ignored due to more important stuff?
Yeah, the past few weeks have been a "bit" busy :(
I'll work to queue this up this week, sorry for the delay...
thanks,
greg k-h