Messages in this thread | | | Date | Sun, 14 May 2006 08:37:31 +0200 | From | Jörn Engel <> | Subject | Re: [PATCH] mtd: fix memory leaks in phram_setup |
| |
On Sun, 14 May 2006 00:40:42 +0100, David Woodhouse wrote: > > > > Want me to fix the macro and the users of it? > > Well, the exclamation was intended to provoke Jörn or Jochen into fixing > it for themselves, but if you get there first that'd be great too :)
The only question is: does it make the code better? The code has seven printk/return combinations. Each of them would chew up 2 more lines without the macro. So phram_setup would grow from 44 to 58 lines, not nice either.
What bugs me more is the hidden allocation in parse_name. Looks like that should return a pointer or ERR_PTR(foo), not an int.
Jörn
-- There are two ways of constructing a software design: one way is to make it so simple that there are obviously no deficiencies, and the other is to make it so complicated that there are no obvious deficiencies. -- C. A. R. Hoare - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |