From: SF Markus Elfring <elfring@users.sourceforge.net>
To: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Halil Pasic <pasic@linux.vnet.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH 1/3] s390: virtio: Delete error messages for failed memory allocations in two functions
Date: Tue, 16 May 2017 17:51:57 +0200 [thread overview]
Message-ID: <78b6667b-69c4-39c5-7e1b-1b69ae983695@users.sourceforge.net> (raw)
In-Reply-To: <d02fd34c-da59-0c33-d859-e49ecb4eb1c5@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 May 2017 16:50:17 +0200
Omit three extra messages for memory allocation failures in these functions.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/s390/virtio/virtio_ccw.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
index 2a76ea78a0bf..447fe718c0ab 100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -499,12 +499,10 @@ static struct virtqueue *virtio_ccw_setup_vq(struct virtio_device *vdev,
if (!info) {
- dev_warn(&vcdev->cdev->dev, "no info\n");
err = -ENOMEM;
goto out_err;
}
info->info_block = kzalloc(sizeof(*info->info_block),
GFP_DMA | GFP_KERNEL);
if (!info->info_block) {
- dev_warn(&vcdev->cdev->dev, "no info block\n");
err = -ENOMEM;
goto out_err;
}
@@ -1225,7 +1223,6 @@ static int virtio_ccw_online(struct ccw_device *cdev)
vcdev = kzalloc(sizeof(*vcdev), GFP_KERNEL);
if (!vcdev) {
- dev_warn(&cdev->dev, "Could not get memory for virtio\n");
ret = -ENOMEM;
goto out_free;
}
--
2.13.0
next prev parent reply other threads:[~2017-05-16 15:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 15:50 [PATCH 0/3] S390-virtio: Adjustments for three function implementations SF Markus Elfring
2017-05-16 15:51 ` SF Markus Elfring [this message]
2017-05-16 15:52 ` [PATCH 2/3] s390: virtio: Improve a size determination in virtio_ccw_setup_vq() SF Markus Elfring
2017-05-16 15:53 ` [PATCH 3/3] s390: virtio: Adjust a null pointer check in two functions SF Markus Elfring
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=78b6667b-69c4-39c5-7e1b-1b69ae983695@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=cornelia.huck@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pasic@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).