Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934342AbcKDKmb (ORCPT ); Fri, 4 Nov 2016 06:42:31 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:54643 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934312AbcKDKm2 (ORCPT ); Fri, 4 Nov 2016 06:42:28 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com uA4AebT6028031 X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org, Boris Brezillon , Brian Norris , Richard Weinberger , David Woodhouse Subject: [PATCH 21/22] mtd: nand: nandsim: remove unneeded checks for nand_scan_ident/tail() Date: Fri, 4 Nov 2016 19:43:09 +0900 Message-Id: <1478256190-7452-22-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478256190-7452-1-git-send-email-yamada.masahiro@socionext.com> References: <1478256190-7452-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 837 Lines: 33 The nand_scan_ident/tail() never returns a positive value when it fails. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/nandsim.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 1eb9344..c76287a 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -2313,8 +2313,6 @@ static int __init ns_init_module(void) retval = nand_scan_ident(nsmtd, 1, NULL); if (retval) { NS_ERR("cannot scan NAND Simulator device\n"); - if (retval > 0) - retval = -ENXIO; goto error; } @@ -2350,8 +2348,6 @@ static int __init ns_init_module(void) retval = nand_scan_tail(nsmtd); if (retval) { NS_ERR("can't register NAND Simulator\n"); - if (retval > 0) - retval = -ENXIO; goto error; } -- 1.9.1