From patchwork Sat Oct 29 20:22:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 9404147 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 51DA0606DC for ; Sat, 29 Oct 2016 20:23:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42F3928E66 for ; Sat, 29 Oct 2016 20:23:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3794629155; Sat, 29 Oct 2016 20:23:22 +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 E15092914F for ; Sat, 29 Oct 2016 20:23:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753175AbcJ2UXV (ORCPT ); Sat, 29 Oct 2016 16:23:21 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:47272 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754498AbcJ2UXU (ORCPT ); Sat, 29 Oct 2016 16:23:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2307C616B8; Sat, 29 Oct 2016 20:23:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1477772599; bh=dUgjeJ9w/ZKSCniwa6KPCO/nFwgDTQ2cToUB0xHVeoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h/49n291FE7MiBIZbHilHuI+igugf+6AHv9Dxx+k/IXFjuZGxzYaJYdJg5ifeIX37 Ap3hg0LNlcGh0UPDyQcNa+7YsUiki5Uw0LwhYQFs10cTVIiI3vT/MCgDSEaXJXORLJ RD1jotg69+fZSZglBCIwDLpGvP4TRN/DEUe9r8VQ= 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 DA3D561714; Sat, 29 Oct 2016 20:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1477772598; bh=dUgjeJ9w/ZKSCniwa6KPCO/nFwgDTQ2cToUB0xHVeoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NHzy9o1L1yy/99rxVytVjlj/qYH/IcX7Ti0Eor2U0LLB66vP9PJBWbcPhpEgAKUNi f6Yy9MMayRuV6Edqq0m5imM/fot0VQeO5vPgmPpeGTaG0BhP4kpxUj9k/aHjA1Fnhn wdpuRLvFZOl2Ey9BD70ncxB12ZAsQi9RmxWQv9zU= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org DA3D561714 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 v3 12/12] scsi/ufs: qcom: Don't free resource-managed kmalloc element Date: Sun, 30 Oct 2016 01:52:14 +0530 Message-Id: <1477772534-14170-13-git-send-email-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477772534-14170-1-git-send-email-vivek.gautam@codeaurora.org> References: <1477772534-14170-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 --- New patch added in v3 of this cleanup series. 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 9590df5..60a38b1 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -1263,7 +1263,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;