public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-cris-kernel@axis.com,
	Alexander Sverdlin <alexander.sverdlin@gmail.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Jesper Nilsson <jesper.nilsson@axis.com>,
	Krzysztof Halasa <khalasa@piap.pl>,
	Mikael Starvik <starvik@axis.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Shawn Guo <shawnguo@kernel.org>, Tony Lindgren <tony@atomide.com>,
	Vladimir Zapolskiy <vz@mleia.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 3/5] cris: nand: Delete a jump target in crisv32_nand_flash_probe()
Date: Wed, 4 Oct 2017 20:47:28 +0200	[thread overview]
Message-ID: <c70b5a98-3c08-e926-23cf-18dea0ddeb5f@users.sourceforge.net> (raw)
In-Reply-To: <cd84411c-d202-70d6-dec2-c02bedaf3594@users.sourceforge.net>

From: Markus Elfring <elfring@users.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@users.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

  parent reply	other threads:[~2017-10-04 18:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 18:43 [PATCH 0/5] CRIS v32: Adjustments for crisv32_nand_flash_probe() SF Markus Elfring
2017-10-04 18:45 ` [PATCH 1/5] cris: nand: Delete an error message for a failed memory allocation in crisv32_nand_flash_probe() SF Markus Elfring
2017-10-04 19:44   ` Alexander Sverdlin
2017-10-04 19:55     ` SF Markus Elfring
2017-10-04 20:12     ` [PATCH 1/5] " Julia Lawall
2017-10-04 20:16   ` Alexander Sverdlin
2017-10-04 18:46 ` [PATCH 2/5] cris: nand: Improve a size determination " SF Markus Elfring
2017-10-04 18:47 ` SF Markus Elfring [this message]
2017-10-04 18:48 ` [PATCH 4/5] cris: nand: Delete an unnecessary local variable " SF Markus Elfring
2017-10-04 20:17   ` Alexander Sverdlin
2017-10-04 18:50 ` [PATCH 5/5] cris: nand: Split a condition check " SF Markus Elfring
2017-10-04 20:26   ` Alexander Sverdlin
2017-10-05 15:31 ` [PATCH 0/5] CRIS v32: Adjustments for crisv32_nand_flash_probe() Gregory CLEMENT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c70b5a98-3c08-e926-23cf-18dea0ddeb5f@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=alexander.sverdlin@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=jesper.nilsson@axis.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=khalasa@piap.pl \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=shawnguo@kernel.org \
    --cc=starvik@axis.com \
    --cc=tony@atomide.com \
    --cc=vz@mleia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox