Skip to content

Commit

Permalink
dell-laptop: fix error return code in dell_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Matthew Garrett committed Jul 8, 2013
1 parent b253c9d commit 9f20820
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/platform/x86/dell-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9f20820

Please sign in to comment.