From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47A92C352A2 for ; Thu, 6 Feb 2020 19:25:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 206C0214AF for ; Thu, 6 Feb 2020 19:25:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581017104; bh=MBdlTzvbi/xbvJgoj8nBzRRWdOsm0VVRXj9AcDqhuLg=; h=Subject:To:Cc:From:Date:List-ID:From; b=aocpoUGACg9rRWr3gRuolHu7JxyO77kYq0zoi/dMJ0AKuE5bS3eZ94AP7VSgHKZ9Y 2q63GruZfo5wbsp48/Kx4TkkV/G1/DDmMn9105GdR3GP+/hoZTHxGD+6Cz6D2wWR7V dRbTAuwL61kq1v5jjLfbGjlseL0v2RR/KOI7hHcc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728053AbgBFTZD (ORCPT ); Thu, 6 Feb 2020 14:25:03 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:35927 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727738AbgBFTZD (ORCPT ); Thu, 6 Feb 2020 14:25:03 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DABB6220DD; Thu, 6 Feb 2020 14:25:02 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 06 Feb 2020 14:25:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=y5c58c ZOXJ3g4nMXDm1gVVBgxD4KyweszFw/Nbnka9s=; b=DXj5TdnZc9rVuyXphHBLP5 Uwfeq83Sx5UQAJIjOCRNzpr1S6VRq69G1+Ond+GLwWWAAKOT9rGEkOSz9xRj22Ft IRQCvqtmW2SmvKICPghJ9we3Y5AePo2hz+HHsAJD0kyDFoC9pXL8bTLyY8vB6Iyv ZCBPj05PFDY4VqeOOprfnfySpbNe+Kfv1WUrzIZuthPDmqQHB4jw/tMb9OlexZBg n/1PkYMtbyYqWfsVbgBVB6p89AfLPl7JkdI9Ro/NciZBAZ3rPp0oQ5eJujrjdK1F 9IJpn4Amf7XzNC+2hicOJNYIl8s9bQJlhFJDJsX6++iMOkjup02hKTEikcAuTVFg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrheefgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtjeenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepkeefrdekiedrkeelrd dutdejnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomhep ghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 41D7D328005E; Thu, 6 Feb 2020 14:25:02 -0500 (EST) Subject: FAILED: patch "[PATCH] mmc: sdhci-of-at91: fix memleak on clk_get failure" failed to apply to 4.9-stable tree To: mirq-linux@rere.qmqm.pl, adrian.hunter@intel.com, ludovic.desroches@microchip.com, stable@vger.kernel.org, ulf.hansson@linaro.org Cc: From: Date: Thu, 06 Feb 2020 20:08:49 +0100 Message-ID: <1581016129126162@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.9-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From a04184ce777b46e92c2b3c93c6dcb2754cb005e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Date: Thu, 2 Jan 2020 11:42:16 +0100 Subject: [PATCH] mmc: sdhci-of-at91: fix memleak on clk_get failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sdhci_alloc_host() does its work not using managed infrastructure, so needs explicit free on error path. Add it where needed. Cc: Fixes: bb5f8ea4d514 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC") Signed-off-by: Michał Mirosław Acked-by: Ludovic Desroches Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/b2a44d5be2e06ff075f32477e466598bb0f07b36.1577961679.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c index b2a8c45c9c23..ab2bd314a390 100644 --- a/drivers/mmc/host/sdhci-of-at91.c +++ b/drivers/mmc/host/sdhci-of-at91.c @@ -345,20 +345,23 @@ static int sdhci_at91_probe(struct platform_device *pdev) priv->mainck = NULL; } else { dev_err(&pdev->dev, "failed to get baseclk\n"); - return PTR_ERR(priv->mainck); + ret = PTR_ERR(priv->mainck); + goto sdhci_pltfm_free; } } priv->hclock = devm_clk_get(&pdev->dev, "hclock"); if (IS_ERR(priv->hclock)) { dev_err(&pdev->dev, "failed to get hclock\n"); - return PTR_ERR(priv->hclock); + ret = PTR_ERR(priv->hclock); + goto sdhci_pltfm_free; } priv->gck = devm_clk_get(&pdev->dev, "multclk"); if (IS_ERR(priv->gck)) { dev_err(&pdev->dev, "failed to get multclk\n"); - return PTR_ERR(priv->gck); + ret = PTR_ERR(priv->gck); + goto sdhci_pltfm_free; } ret = sdhci_at91_set_clks_presets(&pdev->dev);