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 76EEDC35247 for ; Thu, 6 Feb 2020 19:25:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4FEF8214AF for ; Thu, 6 Feb 2020 19:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581017101; bh=l35uYEMNQJq35BB2qAd+/c/CNC1EMEFZmxtd31KUHZI=; h=Subject:To:Cc:From:Date:List-ID:From; b=I9Yei2yZ6sQpoe5f0txMg2pBJg1X0ymdMZuk66QG88lRihbz0jw9iWLlIcZtUtx3l yZeCIYG79gc/3it1rleD+qZ140DIYlkfxU8kbW4MgizcjfGZGJ8L3eCf9KyhWyNXMF cyImWw/bNBNUGF8BLcLYxmkSWkPJSrmD53xUTXV0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727848AbgBFTZB (ORCPT ); Thu, 6 Feb 2020 14:25:01 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:35247 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727738AbgBFTZA (ORCPT ); Thu, 6 Feb 2020 14:25:00 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A554B220C7; Thu, 6 Feb 2020 14:24:59 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 06 Feb 2020 14:24:59 -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=M1MD0M zCWbbcKmzRZR6zU+LhwYZRANuYUzOgsTFPUhM=; b=1hU1hohIRSz5+TVK2Xm/MB 26QS4IIiNv7+SPxkhinrMnQK/p6S6F7nKVPIHPURaI7bdswsO6jYt2shXibguRdg vv2AmJzhEDp9lKDKNBSMo4gxKE3gHKJTeolvQcHIhsoaUBSpcbUlsqZ+xASO2Zyi fn2Q0t4nIgAp9+lH+dUBL2KJhoQ8DQ866BVKIc+uxR+MmtoXI7OGnpqRsT7asAkN 7+5g7vdI7Ll3ggp/OGGlINBoTvr7Wt2PtGr6fHKuu1e5zp9eA3SJaUdWsDADNzhJ w8pJMD3jsKcW+hXML97Ozi/i6yJxbViCR5CdA/jV4xn5KIT0SU+XR4n3eoDbuhAQ == 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 45F7F3280059; Thu, 6 Feb 2020 14:24:59 -0500 (EST) Subject: FAILED: patch "[PATCH] mmc: sdhci-of-at91: fix memleak on clk_get failure" failed to apply to 4.19-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:48 +0100 Message-ID: <158101612875255@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.19-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);