Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp7089ybt; Tue, 23 Jun 2020 13:50:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAsxXSSaABdoCnxsR4C3zKxvyGqY4/6E7nMlC+3yPYKT3WlvA8/N0CqoybeGKZPe3UzdHr X-Received: by 2002:a05:6402:21c2:: with SMTP id bi2mr23494865edb.296.1592945430707; Tue, 23 Jun 2020 13:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592945430; cv=none; d=google.com; s=arc-20160816; b=ryQ9FTBTTf3xcNSmgH5UAT3Dd8PEQtg8iTtkOfU5noAlEoudz355xORu/duar3GDic 53UgczhWdpILkBnv58/bfqxdSCY1R0N60szfSVWnC3I05wiFQPmJhpjarpixHvRVgcOj rGWASSRHiD7RBagvXi3a/gprfmszJLFDcw4NopcllCaPYu0G/tmU5hAbYC/cAr+AeSqJ WYGoBo90JInM4SU7UsJrrxYQcHKbuGpZ++Ulhjg+uQlchEVPVJhdzMNGwmsAW686Dho5 Ne4bg0jXw+tLgG4oNZfdHWTnRcpCD2XfefsBZqv7z1HPSYc+PuO2L6cAaEdIwAlIUk7U UAnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0pOBmvJ3R8NgnLr3FaVXv3dLvlqGG9+hGZSJG074G/g=; b=E41Wr8sN20Kd8czASxhae5Qj4DJ6LUseArM6j0CDZe0RsWuitNnTnjVb6g8NjgWT+8 6rRXOV2ExGprY0JgOUzq+M2HhFXeezgRztdGC0F92c4Kw4W8WsuNEV9Srq4wFw8GKtvI CoW8DJe+h7DjJs0UO64D1xuz619rMRnWippD6wCRCzwjfXJQQfBa4GtKHoYHbOwff7Z1 /IwqtPNrhLBxLoDe5HVc5rCQrdyq7VXqS5lkN2dT6di6jtq6iCf2FJWW+khV/g06IGo1 yFb67xEjj+S1WXjR/3ECzIXBizXN6J57lYFt4fgOoXl42FuVh/CUbaA4BpSEfjnmEddQ jATg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I7zn8UtV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt20si14444854ejc.24.2020.06.23.13.50.07; Tue, 23 Jun 2020 13:50:30 -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=I7zn8UtV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391299AbgFWUss (ORCPT + 99 others); Tue, 23 Jun 2020 16:48:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:47858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392185AbgFWUsn (ORCPT ); Tue, 23 Jun 2020 16:48:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 7C7312098B; Tue, 23 Jun 2020 20:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592945324; bh=UEJvs1cLruhzQaC1R2JJ/mebARuLg6W56m+2KUqd530=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I7zn8UtV4C1JQIGS83evkpocez4vKCA3U9RjKXrplUPqQ54pi367/s2ib6lEzw5B0 zIPXH4cjTqIDQ8f4g3SEOgHVtrhNoK7odsWLUc2Z8eoOPgFm3mwGIE+wrt0GzO4ObF o+YMxUH099K+4hxyUC3KzaIugg/UpmIvoXaPQGRY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miquel Raynal , Sasha Levin Subject: [PATCH 4.14 126/136] mtd: rawnand: socrates: Fix the probe error path Date: Tue, 23 Jun 2020 21:59:42 +0200 Message-Id: <20200623195310.142124689@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195303.601828702@linuxfoundation.org> References: <20200623195303.601828702@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miquel Raynal [ Upstream commit 9c6c2e5cc77119ce0dacb4f9feedb73ce0354421 ] nand_release() is supposed be called after MTD device registration. Here, only nand_scan() happened, so use nand_cleanup() instead. There is no real Fixes tag applying here as the use of nand_release() in this driver predates by far the introduction of nand_cleanup() in commit d44154f969a4 ("mtd: nand: Provide nand_cleanup() function to free NAND related resources") which makes this change possible. However, pointing this commit as the culprit for backporting purposes makes sense even if this commit is not introducing any bug. Fixes: d44154f969a4 ("mtd: nand: Provide nand_cleanup() function to free NAND related resources") Signed-off-by: Miquel Raynal Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-mtd/20200519130035.1883-51-miquel.raynal@bootlin.com Signed-off-by: Sasha Levin --- drivers/mtd/nand/socrates_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c index f960f18ea3e24..8d4f0cd7197d3 100644 --- a/drivers/mtd/nand/socrates_nand.c +++ b/drivers/mtd/nand/socrates_nand.c @@ -195,7 +195,7 @@ static int socrates_nand_probe(struct platform_device *ofdev) if (!res) return res; - nand_release(nand_chip); + nand_cleanup(nand_chip); out: iounmap(host->io_base); -- 2.25.1