lkml.org 
[lkml]   [2009]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] txx9wdt.c:52: Fix txx9wdt_probe() cleaning up after errors
Hi Atsushi,

> > Make txx9wdt_probe() clean up after errors.
> >
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> > ---
> > Any comments?
>
> Well, why is this patch needed? I intentionally omitted iounmap and
> release_mem_region because devres guarantee these resources are freed
> on probe failure. Or are there any leaks?

My opinion: a driver should do proper clean-up on probe failures because
1) this makes clean and robust code and shows that you know what you are doing
2) to avoid having to search for leaks if there are any. See the NULL pointer story...

Kind regards,
Wim.



\
 
 \ /
  Last update: 2009-08-27 22:15    [W:0.048 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site