提交 9f208202 编写于 作者: W Wei Yongjun 提交者: Matthew Garrett

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
上级 b253c9d1
...@@ -551,9 +551,10 @@ static int __init dell_init(void) ...@@ -551,9 +551,10 @@ static int __init dell_init(void)
* is passed to SMI handler. * is passed to SMI handler.
*/ */
bufferpage = alloc_page(GFP_KERNEL | GFP_DMA32); bufferpage = alloc_page(GFP_KERNEL | GFP_DMA32);
if (!bufferpage) {
if (!bufferpage) ret = -ENOMEM;
goto fail_buffer; goto fail_buffer;
}
buffer = page_address(bufferpage); buffer = page_address(bufferpage);
if (quirks && quirks->touchpad_led) if (quirks && quirks->touchpad_led)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册