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.7 required=3.0 tests=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 45707C433DF for ; Fri, 19 Jun 2020 13:49:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 217D9208C7 for ; Fri, 19 Jun 2020 13:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592574595; bh=uNDj5AE6KEqSk4Q9kJVVUjgUU8KjwFEkKysmJCk1Vow=; h=Subject:To:Cc:From:Date:List-ID:From; b=X4wYPj8HLOwfvvxNbfnnhl+TTvNeFDkiDWK/Y20vX4CiZfdt3mGSA5bkm+66Lj+IR 68amOoTWyiKR0G+cCciEw8qHPF9SdUmIxo1nMZuc0sQbfJ4b9e1s1kzdW2Wz6GdgPe WbLTPO7QYsC6dU71AWWEtqo79qrH7ozGA9j0t7Dk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732681AbgFSNty (ORCPT ); Fri, 19 Jun 2020 09:49:54 -0400 Received: from forward5-smtp.messagingengine.com ([66.111.4.239]:57515 "EHLO forward5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732007AbgFSNtw (ORCPT ); Fri, 19 Jun 2020 09:49:52 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.nyi.internal (Postfix) with ESMTP id 62B1A194575A; Fri, 19 Jun 2020 09:49:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 19 Jun 2020 09:49:51 -0400 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=fm3; bh=ziOgnx zutxk+giliO8A56Yl8outj88b1gjEJMCHag2Y=; b=FTtQLg5OuxYoQfQlbcgZaU G28UKK9uYeFgmxv/OMl2tMHg4yEasCoI9TKCmSYGOn3xqlpYKOqkfMzzH5Vffppl 275ew2N4DHgci5taoSAZ6Znd/UyelkRxlRq6WDUHwnTq5XcrLOdGZXOUEWAzwwS8 2g5SRUV+roNzJM6f0VFVw9OqBTueEkI9sK132d/BpEYFtkUsLNY1JU7mdDNioW2P tdYIvHavQ8z+PqfCsAGHvGNshIRnkwITgxNRj9AJ/pUYHbam38Swa9NBrs8AKFh6 o3Mv/J/Y0IJmj5v/zbMI4odL5hSRCbcM7GqIaort6MTtnrO5ICi0VTUhyx+q8JUA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejiedgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuggftrfgrthhtvghrnhepleelledvgeefleeltdetgedugeffgffhudffudduke egfeelgeeigeekjefhleevnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphep keefrdekiedrkeelrddutdejnecuvehluhhsthgvrhfuihiivgepudehnecurfgrrhgrmh epmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh 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 DBA843061856; Fri, 19 Jun 2020 09:49:50 -0400 (EDT) Subject: FAILED: patch "[PATCH] mtd: rawnand: oxnas: Fix the probe error path" failed to apply to 4.14-stable tree To: miquel.raynal@bootlin.com Cc: From: Date: Fri, 19 Jun 2020 15:49:49 +0200 Message-ID: <159257458912643@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 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.14-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 154298e2a3f6c9ce1d76cdb48d89fd5b107ea1a3 Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Tue, 19 May 2020 15:00:09 +0200 Subject: [PATCH] mtd: rawnand: oxnas: Fix the probe error path nand_release() is supposed be called after MTD device registration. Here, only nand_scan() happened, so use nand_cleanup() instead. While at it, be consistent and move the function call in the error path thanks to a goto statement. Fixes: 668592492409 ("mtd: nand: Add OX820 NAND Support") Signed-off-by: Miquel Raynal Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-mtd/20200519130035.1883-37-miquel.raynal@bootlin.com diff --git a/drivers/mtd/nand/raw/oxnas_nand.c b/drivers/mtd/nand/raw/oxnas_nand.c index bead5ac70160..4fadfa118582 100644 --- a/drivers/mtd/nand/raw/oxnas_nand.c +++ b/drivers/mtd/nand/raw/oxnas_nand.c @@ -140,10 +140,8 @@ static int oxnas_nand_probe(struct platform_device *pdev) goto err_release_child; err = mtd_device_register(mtd, NULL, 0); - if (err) { - nand_release(chip); - goto err_release_child; - } + if (err) + goto err_cleanup_nand; oxnas->chips[oxnas->nchips] = chip; ++oxnas->nchips; @@ -159,6 +157,8 @@ static int oxnas_nand_probe(struct platform_device *pdev) return 0; +err_cleanup_nand: + nand_cleanup(chip); err_release_child: of_node_put(nand_np); err_clk_unprepare: