Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f208202 authored by Wei Yongjun's avatar Wei Yongjun Committed by Matthew Garrett
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
parent b253c9d1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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)