Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1562916 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-01-19 18:00 +0100 |
| Last post | 2017-01-19 18:00 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/8] powerpc/nvram: Return directly after a failed kmalloc() in dev_nvram_write() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-19 18:00 +0100
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-01-19 18:00 +0100 |
| Subject | [PATCH 2/8] powerpc/nvram: Return directly after a failed kmalloc() in dev_nvram_write() |
| Message-ID | <t1oe5-40V-1@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Thu, 19 Jan 2017 15:44:03 +0100 Return directly after a call of the function "kmalloc" failed here. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- arch/powerpc/kernel/nvram_64.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index 37d08b95c3f0..cf839adf3aa7 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c @@ -802,11 +802,9 @@ static ssize_t dev_nvram_write(struct file *file, const char __user *buf, count = min_t(size_t, count, size - *ppos); count = min(count, PAGE_SIZE); - - ret = -ENOMEM; tmp = kmalloc(count, GFP_KERNEL); if (!tmp) - goto out; + return -ENOMEM; ret = -EFAULT; if (copy_from_user(tmp, buf, count)) -- 2.11.0
Back to top | Article view | linux.kernel
csiph-web