From: Julia Lawall Date: Mon, 23 Jun 2008 18:14:52 +0000 (+1000) Subject: drivers/macintosh/smu.c: Improve error handling X-Git-Tag: v2.6.27-rc1~1058^2~101 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73f38fe1b563a9d23ffacbda7b51decf41b0c49c;p=pandora-kernel.git drivers/macintosh/smu.c: Improve error handling 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 Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed