Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp568353pxb; Fri, 16 Apr 2021 12:24:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnbocSBHTC9NCuVMrEq/EeQD1E14Bi1+/tiIkCWxB2C9U1M2j0LSM3WDWsQahN8xdrn8RT X-Received: by 2002:a17:906:eb09:: with SMTP id mb9mr9665047ejb.452.1618601076398; Fri, 16 Apr 2021 12:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618601076; cv=none; d=google.com; s=arc-20160816; b=entg4jwHpNtvjSnm/Vr+VHf/PDx3w78bT3Ny5qtMlL3qNxNOfbn9rrQ+VIKkmXoXJA bmQ1+rlhRIZpp6vS4NQ0CTzF8aOkZ76rpYzRm/BZVf2fO7xQL+T5ru4XP29zGPSo72x/ CMf9dcbnqFmQ2j2QaUoedlJtAbOF/xHlz5Uk7zavYIER32z4+XAISZdbWBWrmDDMioE+ p23QZPaUN32VYt0lGkgyDQ3eA5eLGGXoXismlwHoMOje6Dscu3Tj29SrazNuz6hi2RM3 UgnLOpOqbwJOM9aVnS4F7FS+9Xa4c+yjGx2u5Ff0UCTn4SRrQ2Dcoh3lPiusOM9BVS3W av8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=N6ub7wtSp5eMgZGQ6htSpcYkY47epXuiTqKIqP/coGY=; b=mMBdiiIAiV+VOCtdHq5Bg2S6XjTyU+dDByLGRPeuXIbYXohDTtXGDoNqM02ZUWMDW3 9i5MJ2OKP+1sGWaq3GHb61ahJZfVRGkAVP9oOyeFvaHfgn96LL8ENdcWh4lEVRMJrnkN 5hs13Ls0GtA59ImUrpjr7/coEiLmaytNMZh73vScgJ7+6cYj5Kgdws1CieFw9WZ0glOQ 6TSpph4JK+e3bDes397yPoLs7U5Q8Ormf619inl8Vwl5aI6HlbTR9wv50ui53a0D4mj0 hFDcj46POQj4wS/Gdk/e9QvbRIgIZQPdKGAfRd+Ab6LmY0EnbVdli8UCE7lEpytu3LQ5 vgdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=SotBZttL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 13si5224381ejh.174.2021.04.16.12.24.12; Fri, 16 Apr 2021 12:24:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=SotBZttL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245341AbhDPSsA (ORCPT + 99 others); Fri, 16 Apr 2021 14:48:00 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:64956 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245224AbhDPSrz (ORCPT ); Fri, 16 Apr 2021 14:47:55 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1618598851; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=N6ub7wtSp5eMgZGQ6htSpcYkY47epXuiTqKIqP/coGY=; b=SotBZttLpS5Ng3+PSqaRG4kmRr04cYL04RDjMS0agNWfb9fAVzIcUQ+W35C+55tE50nQVCIq iLqyvYTaaN4h9mXLjmpkj/ds3UdRS0HAMEiaxtnVE1QSbzf56mJKKverw61LilLwJ0vilONP Aa8unJ3fawhhbz9jBVSwECiXIeY= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 6079dbb6c39407c327e501c3 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 16 Apr 2021 18:47:18 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 2A038C43469; Fri, 16 Apr 2021 18:47:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id 181C8C43461; Fri, 16 Apr 2021 18:47:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 181C8C43461 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, loic.poulain@linaro.org, linux-wireless@vger.kernel.org, kvalo@codeaurora.org, ath11k@lists.infradead.org, Bhaumik Bhatt Subject: [PATCH v1 2/6] bus: mhi: core: Set BHI and BHIe pointers to NULL in clean-up Date: Fri, 16 Apr 2021 11:47:01 -0700 Message-Id: <1618598825-18629-3-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618598825-18629-1-git-send-email-bbhatt@codeaurora.org> References: <1618598825-18629-1-git-send-email-bbhatt@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Set the BHI and BHIe pointers to NULL as part of clean-up. This makes sure that stale pointers are not accessed after powering MHI down. Suggested-by: Hemant Kumar Signed-off-by: Bhaumik Bhatt --- drivers/bus/mhi/core/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c index 11c7a3d..1cc2f22 100644 --- a/drivers/bus/mhi/core/init.c +++ b/drivers/bus/mhi/core/init.c @@ -1132,6 +1132,9 @@ void mhi_unprepare_after_power_down(struct mhi_controller *mhi_cntrl) mhi_cntrl->rddm_image = NULL; } + mhi_cntrl->bhi = NULL; + mhi_cntrl->bhie = NULL; + mhi_deinit_dev_ctxt(mhi_cntrl); } EXPORT_SYMBOL_GPL(mhi_unprepare_after_power_down); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project