• Julia Lawall's avatar
    drivers/macintosh/smu.c: Improve error handling · 73f38fe1
    Julia Lawall authored
    This makes two changes:
    
    * As noted by Akinobu Mita in patch
    b1fceac2, 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: default avatarJulia Lawall <julia@diku.dk>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    73f38fe1
smu.c 30.6 KB