lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 4 Oct 2017 20:47:28 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-cris-kernel@...s.com,
        Alexander Sverdlin <alexander.sverdlin@...il.com>,
        Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Gregory Clement <gregory.clement@...e-electrons.com>,
        Jesper Nilsson <jesper.nilsson@...s.com>,
        Krzysztof Halasa <khalasa@...p.pl>,
        Mikael Starvik <starvik@...s.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Tony Lindgren <tony@...mide.com>,
        Vladimir Zapolskiy <vz@...ia.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 3/5] cris: nand: Delete a jump target in
 crisv32_nand_flash_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 4 Oct 2017 18:55:01 +0200

* Move a bit of exception handling code into an if branch
  because the code was used only for one case before.

* Delete the jump target "out_mtd" which became unnecessary
  with this refactoring.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 arch/cris/arch-v32/drivers/mach-a3/nandflash.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c
index 3b5be9b984b4..f30579ec8ad7 100644
--- a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c
+++ b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c
@@ -163,13 +163,10 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
 	/* Scan to find existence of the device */
 	if (nand_scan(crisv32_mtd, 1)) {
 		err = -ENXIO;
-		goto out_mtd;
+		kfree(wrapper);
+		return NULL;
 	}
 
 	return crisv32_mtd;
-
-out_mtd:
-	kfree(wrapper);
-	return NULL;
 }
 
-- 
2.14.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ