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

Commit 9c464681 authored by Mohammed Javid's avatar Mohammed Javid
Browse files

msm: ipa3: Return -ENOMEM on mem allocation failure



Return "-ENOMEM" when kzalloc fails.

Change-Id: Ie48d8dcf70ced5a8a7ac805d8a2f60c79571d47f
Acked-by : Abhishek Choubey <abchoube@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Javid <mjavid@codeaurora.org>
parent 3d91e789
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1776,7 +1776,7 @@ static ssize_t ipa3_read_nat4(struct file *file,

	buff = kzalloc(buff_size, GFP_KERNEL);
	if (buff == NULL)
		return 0;
		return -ENOMEM;

	if (!ipa3_ctx->nat_mem.dev.is_dev_init) {
		pos += scnprintf(buff + pos, buff_size - pos,