summaryrefslogtreecommitdiff
path: root/fs/orangefs/devorangefs-req.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-17 22:00:07 +0300
committerMike Marshall <hubcap@omnibond.com>2017-09-14 21:58:29 +0300
commit07a258531c7550f8bb481dfe2ec12bb876224487 (patch)
tree2558baccb7239c3c6d1f4167434e24637dd49dfb /fs/orangefs/devorangefs-req.c
parent121744440582004a1751c688a2622e5dfeaae09d (diff)
downloadlinux-07a258531c7550f8bb481dfe2ec12bb876224487.tar.xz
orangefs: Delete error messages for a failed memory allocation in five functions
Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/devorangefs-req.c')
-rw-r--r--fs/orangefs/devorangefs-req.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
index c19f0787c9c6..2826859bdc2c 100644
--- a/fs/orangefs/devorangefs-req.c
+++ b/fs/orangefs/devorangefs-req.c
@@ -461,13 +461,10 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
if (op->downcall.type != ORANGEFS_VFS_OP_READDIR)
goto wakeup;
- op->downcall.trailer_buf =
- vmalloc(op->downcall.trailer_size);
- if (op->downcall.trailer_buf == NULL) {
- gossip_err("%s: failed trailer vmalloc.\n",
- __func__);
+ op->downcall.trailer_buf = vmalloc(op->downcall.trailer_size);
+ if (!op->downcall.trailer_buf)
goto Enomem;
- }
+
memset(op->downcall.trailer_buf, 0, op->downcall.trailer_size);
if (!copy_from_iter_full(op->downcall.trailer_buf,
op->downcall.trailer_size, iter)) {