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 4B3FAC352A2 for ; Thu, 6 Feb 2020 19:24:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 238E520659 for ; Thu, 6 Feb 2020 19:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581017098; bh=OLSIggX4oOwltzhnfX8BD3jYyDBB38ViMFWpyDokmGQ=; h=Subject:To:Cc:From:Date:List-ID:From; b=uY221AaPijeUp9/4IWliOEvtOEYD9o3xQtntflAkffP2PJUfs7x1Xq7Oz2gv61aqI lljmbmzIoqBTVtFdsDpRnugyYskFe8pi/t3x9UNKhFmJx44AEYLK61bfDu5hSenerE TG2gOswgtbzm+ZbsjqfMjZ978ViIlweImla5EiZM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727875AbgBFTY5 (ORCPT ); Thu, 6 Feb 2020 14:24:57 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39387 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727738AbgBFTY5 (ORCPT ); Thu, 6 Feb 2020 14:24:57 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DD7982207D; Thu, 6 Feb 2020 14:24:56 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 06 Feb 2020 14:24:56 -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=Y1Fg50 JHjK9Y7YKgLF4rvLjfvDcWiSF8N+TscBxxcRk=; b=y/hjUc8dlNUo8ymJxJyy52 yLO3ezPHCSL1dJ6imusG0BPo64EljLG8fCdUy4qAvxTw4gGvn2izpQFq5KHzC1xw mvSMPeCY3LiYYtHu9Ica+psEhESvL78TrZJvoe5zRh/Umn4k94j9pDb5+JSoyTuq 2QG/blsnBKiJGqTZ85ZfZT7hHPwursE3M4KLIrixTxu5XlFIYLtbOtfQgXMrgP7a sWxVG28qfZerNm7UTiTCc4j/9O199in+/38TXyy34NoEtA5ksvhWUVmn+sgNm7ME wLl43fQEBY3MALwKB7EsluT3u6ntAvHNqOawMk2RsW0SUQjRwMpvhMVd3bHJ/L6g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrheefgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtjeenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepkeefrdekiedrkeelrd dutdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep 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 815183280062; Thu, 6 Feb 2020 14:24:56 -0500 (EST) Subject: FAILED: patch "[PATCH] mmc: sdhci-of-at91: fix memleak on clk_get failure" failed to apply to 5.5-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:47 +0100 Message-ID: <1581016127158142@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 5.5-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);