mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-14 09:09:56 +00:00
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>
This commit is contained in:
parent
b253c9d1d8
commit
9f20820259
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user