drivers/macintosh/smu.c: Improve error handling
authorJulia Lawall <julia@diku.dk>
Mon, 23 Jun 2008 18:14:52 +0000 (04:14 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 1 Jul 2008 01:28:17 +0000 (11:28 +1000)
This makes two changes:

* As noted by Akinobu Mita in patch
b1fceac2b9e04d278316b2faddf276015fc06e3b, alloc_bootmem never returns NULL
and always returns a zeroed region of memory.  Thus the error checking code
and memset after the call to alloc_bootmem are not necessary.

* The old error handling code consisted of setting a global variable to
NULL and returning an error code, which could cause previously allocated
resources never to be freed.  The patch adds calls to appropriate resource
deallocation functions.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mackerras <paulus@samba.org>

No differences found