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

Commit 05904381 authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa: fix the un-initialized variable issue



Instead of returning un-initialized value in
rmnet_ipa_query_tethering_stats function,
change to return -ENOMEM.

Change-Id: Id11cee7e6e3654a7db639c0a53fde51228a97098
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 8562c3ab
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2496,15 +2496,15 @@ int rmnet_ipa_query_tethering_stats(struct wan_ioctl_query_tether_stats *data,
	req = kzalloc(sizeof(struct ipa_get_data_stats_req_msg_v01),
			GFP_KERNEL);
	if (!req) {
		IPAWANERR("Can't allocate memory for stats message\n");
		return rc;
		IPAWANERR("failed to allocate memory for stats message\n");
		return -ENOMEM;
	}
	resp = kzalloc(sizeof(struct ipa_get_data_stats_resp_msg_v01),
			GFP_KERNEL);
	if (!resp) {
		IPAWANERR("Can't allocate memory for stats message\n");
		IPAWANERR("failed to allocate memory for stats message\n");
		kfree(req);
		return rc;
		return -ENOMEM;
	}
	memset(req, 0, sizeof(struct ipa_get_data_stats_req_msg_v01));
	memset(resp, 0, sizeof(struct ipa_get_data_stats_resp_msg_v01));
+2 −2
Original line number Diff line number Diff line
@@ -2503,14 +2503,14 @@ int rmnet_ipa3_query_tethering_stats(struct wan_ioctl_query_tether_stats *data,
			GFP_KERNEL);
	if (!req) {
		IPAWANERR("Can't allocate memory for stats message\n");
		return rc;
		return -ENOMEM;
	}
	resp = kzalloc(sizeof(struct ipa_get_data_stats_resp_msg_v01),
			GFP_KERNEL);
	if (!resp) {
		IPAWANERR("Can't allocate memory for stats message\n");
		kfree(req);
		return rc;
		return -ENOMEM;
	}
	memset(req, 0, sizeof(struct ipa_get_data_stats_req_msg_v01));
	memset(resp, 0, sizeof(struct ipa_get_data_stats_resp_msg_v01));