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

Commit 57cbd640 authored by Anil Kumar Mamidala's avatar Anil Kumar Mamidala Committed by Matt Wagantall
Browse files

qcom: rpm-smd: Add NULL check for input data variable



Add NULL check to prevent NULL pointer dereference
during memcmp.

Change-Id: I942468802b7a0d762d82c06e0705aaffb2c4057d
Signed-off-by: default avatarAnil Kumar Mamidala <amami@codeaurora.org>
parent e830b587
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -525,8 +525,8 @@ static int msm_rpm_add_kvp_data_common(struct msm_rpm_request *handle,
	if (probe_status)
		return probe_status;

	if (!handle) {
		pr_err("%s(): Invalid handle\n", __func__);
	if (!handle || !data) {
		pr_err("%s(): Invalid handle/data\n", __func__);
		return -EINVAL;
	}