Received: by 10.223.176.5 with SMTP id f5csp1198019wra; Fri, 9 Feb 2018 14:29:44 -0800 (PST) X-Google-Smtp-Source: AH8x225SlKSXOl7kemjLpweFPupsQ4TCAxM89IYawLCvV33lhJ4ONXnniCojjxdcAzjtV/q9BXCy X-Received: by 2002:a17:902:5688:: with SMTP id j8-v6mr3854794pli.423.1518215384002; Fri, 09 Feb 2018 14:29:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518215383; cv=none; d=google.com; s=arc-20160816; b=IWi/Xez2fQjfxstsrpcfn5m0EzzvmZRg6m3ab7Ytv7JvsuoDtpZL6p7mrsp8eXmaTi KtspwhP3YdV4NKXI4puasgR3iGNVIIwfwwTYrKfgSdXdeRS0WDXncYo8mhrIGXjcHtvS kDiZFsSjxOGKuQgZY+opQm9LTryQVyuu9CBDpqoW/nkpQ+WW9hJw/Tkk/C9dmnjt0MDD du/8X2jV4MY+MAH0MVKveWgeagy0uzGoUBfXilJBVfqUKtD1ISu0tOIWSKIMQE67cZBh Fhag5RANFxEWuFsg7qRz4ECfaXauIelsBcixw4j/9wHOND8k/HvBhskXX7eyZ+/LpDfY xRHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:message-id:date:subject:cc:to :from:arc-authentication-results; bh=QxUn8aGrNQ+s69KOokj8nU73dQcHu7Zo6rSrqC2XkKI=; b=vDuQ2NqObpfRZrjVkjp1RMVbm5VZanJEuq4hq0G6R2l3tLO8UEjjFdOk8IlejeSIX7 Xsc2pLxlHZ8o1dAXiH566ZLATs/RCCJcpL1K6daXbx4c8AQglcd1nwZbILi7KsyTrtBe TCCABaf5se8hrtu9WefH8fLjR/9ev6KEuTtHLFD1u94yGkwmjmMwjIUEqTyqlW3PC+qi Y3kwFBEIqJrDgJzEqx7XQMw7t1qcBvrx4+SlaKIY0CdRoOCVSItN4xkF5V8drlyOcLaV 9x/Fb9uI+WgDMQ24Nc0Vk0wpq71jBRnULnSCg/OWct5nI3JKidJH7FLn62IOYle9QCfl 4fHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si20599pgc.506.2018.02.09.14.29.29; Fri, 09 Feb 2018 14:29:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752991AbeBIW2v (ORCPT + 99 others); Fri, 9 Feb 2018 17:28:51 -0500 Received: from mail.ispras.ru ([83.149.199.45]:44432 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752488AbeBIW2u (ORCPT ); Fri, 9 Feb 2018 17:28:50 -0500 Received: from localhost.localdomain (ppp85-140-182-254.pppoe.mtu-net.ru [85.140.182.254]) by mail.ispras.ru (Postfix) with ESMTPSA id 864CB54006A; Sat, 10 Feb 2018 01:28:48 +0300 (MSK) From: Alexey Khoroshilov To: Boris Brezillon Cc: Alexey Khoroshilov , Stefan Agner , Richard Weinberger , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: [PATCH v4 0/3] mtd: nand: vf610: fix error handling in vf610_nfc_probe() Date: Sat, 10 Feb 2018 01:28:33 +0300 Message-Id: <1518215316-21504-1-git-send-email-khoroshilov@ispras.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20180130141141.7f4fd15a@bbrezillon> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vf610_nfc_probe() misses error handling of mtd_device_register() and contains unneeded of_node_put() on error path. v2: Add nand_cleanup() to undone nand_scan_tail() as Boris Brezillon noted. v3: Rename error labels, remove of_node_put() per Boris Brezillon request. v4: Separate fix in to 3 patches. Alexey Khoroshilov (3): mtd: nand: vf610: remove the unnecessary of_node_put() mtd: nand: vf610: improve readability of error label mtd: nand: vf610: check mtd_device_register() return code drivers/mtd/nand/vf610_nfc.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) -- 2.7.4