[lkml]   [2012]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] drivers/w1: free the w1_master at w1_free_dev and return a correct return value

On Sun, Jun 17, 2012 at 09:47:59PM +0530, Devendra Naga ( 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 <>

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 <>

Evgeniy Polyakov

 \ /
  Last update: 2012-06-20 11:41    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean