drivers/macintosh/smu.c: Improve error handling
This makes two changes:
* As noted by Akinobu Mita in patch
9f40b695c93db287b5444460e0d77178fe4e7dd0, 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>