Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2042915ybl; Sat, 14 Dec 2019 05:05:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzUKjKyrb9afM1il1vXFo4i+An62JXtJueUTssauHbyUojvQQW27H5sLhDJX5aUZZIIzz2D X-Received: by 2002:a05:6830:1608:: with SMTP id g8mr19482116otr.169.1576328724520; Sat, 14 Dec 2019 05:05:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576328724; cv=none; d=google.com; s=arc-20160816; b=o2Hr56S6XS8CxHkUPml5yH0Q5i5ERAPskJUH5X41f/fJLONpocbFvhm9b0Yqia7AW7 xM1g5eiO/rAEzgk4bokW8ljLtsRM/dwIZyiPmL0ra3ZNb6oz/oXgm669fEjnCwAM7XuF SSc95pvkMxxcDc7R3cFMGijagCnlnFD9Eezc3ywG/FOv/3nh2IgoEBNfxtB+EZ0+vdGQ DVHpO5ZinBRKYQS6lIVP3sMcbwvlswp3JgDw5qjZ6KUs6lBdcWUvU5Yuo1/THkOsta0I aI0nX0pQOc2p2SLPWhzz0hsz9CgcgCK4eJCrYSBkKevGBr3eb3Lc7QgSiRkjbM2Aj1qU jglA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature; bh=/2YGTgU8CABW0fQKP2BGr2PLr66zRCOSYznYaN/MJII=; b=AYnb/m9K0jpvv5v8l6Mh/XzEHkOFYe1wRt32lVre8xadisOQ4nneWlghpb+iqDS3EF qBZEd1Nda7IWB3oZMCWZkhUA9at/l8Tx2jxesZN6UP1+KTVpFQVUKTFWbCcanFy2WwVv Na1zRlaeZ6T5Bjj6kqofY4ExHxlizmZOZfpYHIaNxAYxGnqr9TSMpmbiM4/lH2wET7mt /GNwafYp4WuMzKZbYkrK99+kdSUImpjIM8Kax+iKA3nMiIB3IGjVMGkiqdEZWf+2tXw1 e5JBQwBeNknFoNFy157zr/VyfZ8s3HjAx6GB55Fn5d3GhOLfqSB7RWgoJijV9WG94aEA TaIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=XRYfMwU5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si2278301otk.164.2019.12.14.05.05.11; Sat, 14 Dec 2019 05:05:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=XRYfMwU5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbfLNNEN (ORCPT + 99 others); Sat, 14 Dec 2019 08:04:13 -0500 Received: from mail25.static.mailgun.info ([104.130.122.25]:31740 "EHLO mail25.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbfLNNEN (ORCPT ); Sat, 14 Dec 2019 08:04:13 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1576328652; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=/2YGTgU8CABW0fQKP2BGr2PLr66zRCOSYznYaN/MJII=; b=XRYfMwU5T5NV1pHeehJOwUdUE9KERjd90LdzcZiEa4O7jV8LWXDgtC7pKCtjX/yAJibao7zk D/VZ1lX3rgzFLLCR+5B62LKbw5S+oNcO38zeoCAt2LDmj62FV/HwRtUwQi4A0nxDCZOmB7n/ xY6MAt8X0dF3EElDdJBbOGMrXOo= X-Mailgun-Sending-Ip: 104.130.122.25 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5df4ddca.7f659f00c8b8-smtp-out-n02; Sat, 14 Dec 2019 13:04:10 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 132F3C447A2; Sat, 14 Dec 2019 13:04:09 +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=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from pacamara-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: cang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 95E30C433CB; Sat, 14 Dec 2019 13:04:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 95E30C433CB 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=none smtp.mailfrom=cang@codeaurora.org From: Can Guo To: asutoshd@codeaurora.org, nguyenb@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org Cc: Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Venkat Gopalakrishnan , Tomas Winkler , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] scsi: ufs: Put SCSI host after remove it Date: Sat, 14 Dec 2019 05:03:34 -0800 Message-Id: <1576328616-30404-2-git-send-email-cang@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1576328616-30404-1-git-send-email-cang@codeaurora.org> References: <1576328616-30404-1-git-send-email-cang@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In ufshcd_remove(), after SCSI host is removed, put it once so that its resources can be released. Signed-off-by: Can Guo diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index b5966fa..a86b0fd 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -8251,6 +8251,7 @@ void ufshcd_remove(struct ufs_hba *hba) ufs_bsg_remove(hba); ufs_sysfs_remove_nodes(hba->dev); scsi_remove_host(hba->host); + scsi_host_put(hba->host); /* disable interrupts */ ufshcd_disable_intr(hba, hba->intr_mask); ufshcd_hba_stop(hba, true); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project