[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <566B1542.7040902@users.sourceforge.net>
Date: Fri, 11 Dec 2015 19:26:10 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: LKML <linux-kernel@...r.kernel.org>,
Minchan Kim <minchan@...nel.org>,
Nitin Gupta <ngupta@...are.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 2/2] z2ram: Delete a jump label in z2_init()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 11 Dec 2015 18:48:14 +0100
This issue was detected by using the Coccinelle software.
* Let us return directly if a call of the function "register_blkdev" failed.
* Remove the jump label "err" then.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/block/z2ram.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 968f9e5..b07581d 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -345,9 +345,8 @@ z2_init(void)
if (!MACH_IS_AMIGA)
return -ENODEV;
- ret = -EBUSY;
if (register_blkdev(Z2RAM_MAJOR, DEVICE_NAME))
- goto err;
+ return -EBUSY;
ret = -ENOMEM;
z2ram_gendisk = alloc_disk(1);
@@ -374,7 +373,6 @@ out_queue:
put_disk(z2ram_gendisk);
out_disk:
unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME);
-err:
return ret;
}
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists