From patchwork Tue Nov 8 10:07:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 9417091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 523096022E for ; Tue, 8 Nov 2016 10:09:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4466D2892B for ; Tue, 8 Nov 2016 10:09:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 391992896A; Tue, 8 Nov 2016 10:09:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E06132892B for ; Tue, 8 Nov 2016 10:09:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932917AbcKHKJN (ORCPT ); Tue, 8 Nov 2016 05:09:13 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:32958 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932432AbcKHKJM (ORCPT ); Tue, 8 Nov 2016 05:09:12 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1523261545; Tue, 8 Nov 2016 10:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1478599751; bh=d6eC1kw9mVW0mPQIO6nvjrcO1y/JCuJb6ggMBn1F+UQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q77zyFwsWpxLBH9MlTvK1DXUPIRpYOQnJWGA2kpTZ7tH+JBtATSz2FDS+bh5mB80B BSfINxwKtK/4j32vk0Ph4RfpqRc5XIUoYBcsagToXCe6J0KJn0J0hWH00lSxUnsy+j lnYgrVCoMnEelmZ3t8WFqK+0azlnclhHIo5yKp18= Received: from blr-ubuntu-41.ap.qualcomm.com (unknown [202.46.23.61]) (using TLSv1.1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D04E561482; Tue, 8 Nov 2016 10:09:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1478599749; bh=d6eC1kw9mVW0mPQIO6nvjrcO1y/JCuJb6ggMBn1F+UQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kn4MpcE+ZpaypFqh6mDpSiHsTji3BEJdSCCEH1liNEgXW4911Eo9yCR672Az8hZrX Yi17jt7BzhCRWmdag8lSS3HVot6thFfB7kohEFCdN4MvP+MYeIi/dW/yNVVFKMiIsz Fw2tgrWeTjIZEbOQbqewldo8COxPzH3Zr8aPBY6c= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org D04E561482 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=vivek.gautam@codeaurora.org From: Vivek Gautam To: kishon@ti.com, jejb@linux.vnet.ibm.com, vinholikatti@gmail.com, martin.petersen@oracle.com Cc: sboyd@codeaurora.org, subhashj@codeaurora.org, ygardi@codeaurora.org, linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vivek Gautam Subject: [PATCH v5 12/12] scsi/ufs: qcom: Don't free resource-managed kmalloc element Date: Tue, 8 Nov 2016 15:37:51 +0530 Message-Id: <1478599671-13071-13-git-send-email-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478599671-13071-1-git-send-email-vivek.gautam@codeaurora.org> References: <1478599671-13071-1-git-send-email-vivek.gautam@codeaurora.org> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Host is allocated by managed kmalloc (devm_kmalloc). The memory allocated with this function is automatically freed on driver detach. So, no need to make an exclusive free call over it. Signed-off-by: Vivek Gautam Reviewed-by: Subhash Jadavani --- drivers/scsi/ufs/ufs-qcom.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index 31df783..804f4e7 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -1268,7 +1268,6 @@ static int ufs_qcom_init(struct ufs_hba *hba) out_unregister_bus: phy_exit(host->generic_phy); out_host_free: - devm_kfree(dev, host); ufshcd_set_variant(hba, NULL); out: return err;