Skip to content
Commit 73f38fe1 authored by Julia Lawall's avatar Julia Lawall Committed by Paul Mackerras
Browse files

drivers/macintosh/smu.c: Improve error handling

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>
parent 178f8d78
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment