diff options
author | 2013-05-09 10:03:02 +0800 | |
---|---|---|
committer | 2013-07-08 11:46:58 -0400 | |
commit | 9f2082025902b59193dbdcd63550c1e8bc58e706 (patch) | |
tree | eb31dff6935aebcd116771ec89aec1fb7c1a479d /drivers/platform | |
parent | hp-wmi: Enable hotkeys on some systems (diff) | |
download | linux-9f2082025902b59193dbdcd63550c1e8bc58e706.tar.gz linux-9f2082025902b59193dbdcd63550c1e8bc58e706.tar.bz2 linux-9f2082025902b59193dbdcd63550c1e8bc58e706.zip |
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 5 |
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) * 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) |