]> Pileus Git - ~andy/linux/commitdiff
dell-laptop: fix error return code in dell_init()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 9 May 2013 02:03:02 +0000 (10:03 +0800)
committerMatthew Garrett <matthew.garrett@nebula.com>
Mon, 8 Jul 2013 15:46:58 +0000 (11:46 -0400)
Fix to return -ENOMEM in the alloc_page() error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/dell-laptop.c

index 1134119521ac2e4da9708703d8b4252ac807ce15..bb77e18b3dd4d5a8ce882f883dddbd98a28e037f 100644 (file)
@@ -551,9 +551,10 @@ static int __init dell_init(void)
         * is passed to SMI handler.
         */
        bufferpage = alloc_page(GFP_KERNEL | GFP_DMA32);
-
-       if (!bufferpage)
+       if (!bufferpage) {
+               ret = -ENOMEM;
                goto fail_buffer;
+       }
        buffer = page_address(bufferpage);
 
        if (quirks && quirks->touchpad_led)