Re: [PATCH] drivers/w1: free the w1_master at w1_free_dev andreturn a correct return value

From: Evgeniy Polyakov
Date: Wed Jun 20 2012 - 04:07:01 EST


Hi

On Sun, Jun 17, 2012 at 09:47:59PM +0530, Devendra Naga (devendra.aaru@xxxxxxxxx) wrote:
> the w1_master pointer is allced at the w1_alloc_master and is not freed when called with
> w1_remove_master.
>
> when w1_alloc_dev fails the return should be -ENODEV as it does
> device_register, and that is the last case where that function
> will fail.
>
> Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>

Hmm, looks correct, but I wonder how whatever_free() function happend
not to free its arguments.

Looks like device_unregister() calls release callback, but we do not
provide one.

Greg, please pull it into your tree. Thank you.
Acked-by: Evgeniy Polyakov <zbr@xxxxxxxxxxx>

--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/