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

Commit ce38d580 authored by Dhoat Harpal's avatar Dhoat Harpal
Browse files

soc: qcom: ipc_router_mhi_xprt: Initialize variable at start



variable rc is not initialized in the beginning of function
ipc_router_mhi_write and ipc_router_mhi_xprt_probe. This leads
possible use without initialization issue.

Initialize variable in the beginning of both functions.

CRs-Fixed: 2209246
Change-Id: Ida0bdad2336be928d6e440d4143350bbf9f253d5
Signed-off-by: default avatarDhoat Harpal <hdhoat@codeaurora.org>
parent 8e181ea4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2018, 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
@@ -424,7 +424,7 @@ static int ipc_router_mhi_write(void *data,
	struct rr_packet *pkt = (struct rr_packet *)data;
	struct sk_buff *ipc_rtr_pkt;
	struct rr_packet *cloned_pkt;
	int rc;
	int rc = 0;
	struct ipc_router_mhi_xprt *mhi_xprtp =
		container_of(xprt, struct ipc_router_mhi_xprt, xprt);

@@ -948,7 +948,7 @@ error:
 */
static int ipc_router_mhi_xprt_probe(struct platform_device *pdev)
{
	int rc;
	int rc = -ENODEV;
	struct ipc_router_mhi_xprt_config mhi_xprt_config;

	if (pdev && pdev->dev.of_node) {