Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4420084pxu; Mon, 12 Oct 2020 19:48:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHcqyraKBvU1pYynk8Wj34R3EiFizhGW3xltQAjnoQ+4rXw9oblmH0/qSHXxgOJeb9YBwm X-Received: by 2002:a17:906:490d:: with SMTP id b13mr30494133ejq.122.1602557338903; Mon, 12 Oct 2020 19:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602557338; cv=none; d=google.com; s=arc-20160816; b=TBBUNMHvZolqwDfvLf3m6++nJcI8a1X16DaPUOYJzwvC6sz6saxQYZGl1s3U8AStD5 FWA5iD6eD2ZwCILAl82q5w57Jch0McfBrzJcU9//Tl9RJZtZYQYOCToW+aQqsUYTJT+z Qtt1/umjqnujQpNiOL6mVyc75Wd0Jp3LiMAo9WceFdmTgQnSawR2wxqC/3Tjs/xezDkQ 1SIj+zY9W5jSVohjd3blZ2HtRegKo/ifElxhNFfoodwQZW0gpYa2DAvhe/QQ1ygexZde VOBLLmJ+Oc3Vh3oB7ERm5NV0kh6usFZEGz8yL7f0UbRqfqbj4tQcRWDZekbT4hJ4kLst c0jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gSg/YW6ik0VFfOlWMoMu6DL87OxxTjMwjd/uljuzMFM=; b=UA/rAwmfjsL2CgjQgUXJfwF/gxho1YaTiOgRdk8WsAsaqivYXkfB6hTZzKO7lgg6FH Ip63ohczfIGboIPWylp96rb0o2FMxQAsRsPtzOtLVKOVDxGIzpagv0OXfGUuhaFfxxVz NoaS2SJQQyJeaeLwiGTLrXw0IzGAgt5bL2wn6rLqYqKTWWMt/CdVOPVFEL1n+l1VoNIq L8U//AaciLWaaq7yvP5qMejeF6TakjrjYpBSlwZuVOlxuW78AWuljdTxUalRqH1BhJy4 VVhhnBYmCDEgHJybh3Jeq6DmFsGoewyL6ktZQzd0GJ8DKZnxxpJXhLJlYiamtbR0Vsta IdMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZoTrcdJ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si8235173edt.72.2020.10.12.19.48.37; Mon, 12 Oct 2020 19:48:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZoTrcdJ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390864AbgJLODP (ORCPT + 99 others); Mon, 12 Oct 2020 10:03:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:39316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731004AbgJLNhO (ORCPT ); Mon, 12 Oct 2020 09:37:14 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 31A0322202; Mon, 12 Oct 2020 13:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602509818; bh=i/8HbRzEGX4wWm4uRh2kyiPpqym/dW/95Q+ypT/ldq4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZoTrcdJ0Rfg87u5ZvDox7RQkMHgKHGL/HvAPVKGfC/ZdT8KpLB40IhsGkDHrcZUiZ X+dNJByQTN7iTz31Sd0USW5BlrZwyp8FwUtOkWKSITrnqPlGg9OATz6H7i/THurIk2 rtIOkAh6ewoQHPhVdq5qaY6BWZfpSbK7Rzp67etU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miquel Raynal , Nobuhiro Iwamatsu Subject: [PATCH 4.14 42/70] mtd: rawnand: sunxi: Fix the probe error path Date: Mon, 12 Oct 2020 15:26:58 +0200 Message-Id: <20201012132632.202138435@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012132630.201442517@linuxfoundation.org> References: <20201012132630.201442517@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miquel Raynal commit 3d84515ffd8fb657e10fa5b1215e9f095fa7efca upstream. nand_release() is supposed be called after MTD device registration. Here, only nand_scan() happened, so use nand_cleanup() instead. Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support") Signed-off-by: Miquel Raynal Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-mtd/20200519130035.1883-54-miquel.raynal@bootlin.com [iwamatsu: adjust filename] Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/sunxi_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c @@ -2125,7 +2125,7 @@ static int sunxi_nand_chip_init(struct d ret = mtd_device_register(mtd, NULL, 0); if (ret) { dev_err(dev, "failed to register mtd device: %d\n", ret); - nand_release(nand); + nand_cleanup(nand); return ret; }