From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: akpm@linux-foundation.org
Cc: jmarchan@redhat.com, minchan@kernel.org, ngupta@vflare.org,
opensource.ganesh@gmail.com, sergey.senozhatsky@gmail.com,
mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [withdrawn] zram-rework-reset-and-destroy-path-fix-2-fix.patch removed from -mm tree
Date: Thu, 5 Feb 2015 09:58:01 +0900 [thread overview]
Message-ID: <20150205005801.GB462@swordfish> (raw)
In-Reply-To: <54d2b870.FAoima8V46EH7lPc%akpm@linux-foundation.org>
On (02/04/15 16:25), akpm@linux-foundation.org wrote:
> The patch titled
> Subject: zram-rework-reset-and-destroy-path-fix-2-fix
>
> This patch was dropped because it was withdrawn
>
simplifications
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
drivers/block/zram/zram_drv.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 0ed8881..07964dd 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1143,7 +1143,7 @@ static void destroy_devices(unsigned int nr)
static int __init zram_init(void)
{
- int ret = -ENOMEM, dev_id = 0;
+ int ret, dev_id;
if (num_devices > max_num_devices) {
pr_warn("Invalid value for num_devices: %u\n",
@@ -1159,8 +1159,10 @@ static int __init zram_init(void)
/* Allocate the device array and initialize each one */
zram_devices = kzalloc(num_devices * sizeof(struct zram), GFP_KERNEL);
- if (!zram_devices)
- goto out_error;
+ if (!zram_devices) {
+ unregister_blkdev(zram_major, "zram");
+ return -ENOMEM;
+ }
for (dev_id = 0; dev_id < num_devices; dev_id++) {
ret = create_device(&zram_devices[dev_id], dev_id);
parent reply other threads:[~2015-02-05 0:58 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <54d2b870.FAoima8V46EH7lPc%akpm@linux-foundation.org>]
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=20150205005801.GB462@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jmarchan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=opensource.ganesh@gmail.com \
--cc=sergey.senozhatsky@gmail.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