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

Commit f7a993a9 authored by Sudhakar Manapati's avatar Sudhakar Manapati
Browse files

input: synaptics: add NULL pointer check



Add null pointer exception check for pointers which
may be NULL after memory allocation failure and
may be deferenced.

This patch is propagated from msm-3.10 kernel
(commit: 66af29b24da01340efc511e8d63b33c04ebe5273
input: synaptics: add NULL pointer check)
Also cleaned checkpatch warning on msm-3.18 kernel.

Change-Id: I99a24ada5b91743bc57568b6ab7b39e655c7bb64
Signed-off-by: default avatarSarada Prasanna Garnayak <c_sgarna@codeaurora.org>
Signed-off-by: default avatarSudhakar Manapati <smanap@codeaurora.org>
parent 3aee47e1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1403,6 +1403,10 @@ static int fwu_do_read_config(void)

	kfree(fwu->read_config_buf);
	fwu->read_config_buf = kzalloc(fwu->config_size, GFP_KERNEL);
	if (!fwu->read_config_buf) {
		retval = -ENOMEM;
		goto exit;
	}

	block_offset[1] |= (fwu->config_area << 5);