aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-08 22:03:02 -0400
committerMatthew Garrett <matthew.garrett@nebula.com>2013-07-08 11:46:58 -0400
commit9f2082025902b59193dbdcd63550c1e8bc58e706 (patch)
treeeb31dff6935aebcd116771ec89aec1fb7c1a479d
parentb253c9d1d858a3f115f791ee4fe2b9399ae7dbbd (diff)
dell-laptop: fix error return code in dell_init()
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>
-rw-r--r--drivers/platform/x86/dell-laptop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 1134119521ac..bb77e18b3dd4 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -551,9 +551,10 @@ static int __init dell_init(void)
551 * is passed to SMI handler. 551 * is passed to SMI handler.
552 */ 552 */
553 bufferpage = alloc_page(GFP_KERNEL | GFP_DMA32); 553 bufferpage = alloc_page(GFP_KERNEL | GFP_DMA32);
554 554 if (!bufferpage) {
555 if (!bufferpage) 555 ret = -ENOMEM;
556 goto fail_buffer; 556 goto fail_buffer;
557 }
557 buffer = page_address(bufferpage); 558 buffer = page_address(bufferpage);
558 559
559 if (quirks && quirks->touchpad_led) 560 if (quirks && quirks->touchpad_led)