Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1642631 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-05-16 18:00 +0200 |
| Last post | 2017-05-16 18:00 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/3] S390-virtio: Adjustments for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-16 18:00 +0200
[PATCH 3/3] s390: virtio: Adjust a null pointer check in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-16 18:00 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-05-16 18:00 +0200 |
| Subject | [PATCH 0/3] S390-virtio: Adjustments for three function implementations |
| Message-ID | <tHN3b-7uo-5@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Tue, 16 May 2017 17:43:21 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Delete error messages for failed memory allocations in two functions Improve a size determination in virtio_ccw_setup_vq() Adjust a null pointer check in two functions drivers/s390/virtio/virtio_ccw.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.13.0
[toc] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-05-16 18:00 +0200 |
| Subject | [PATCH 3/3] s390: virtio: Adjust a null pointer check in two functions |
| Message-ID | <tHN3c-7uo-27@gated-at.bofh.it> |
| In reply to | #1642631 |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 May 2017 17:14:26 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The script “checkpatch.pl” pointed information out like the following.
Comparison to NULL could be written …
Thus fix the affected source code places.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/s390/virtio/virtio_ccw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
index bfb845d7faa7..27ab0f0b59cd 100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -513,7 +513,7 @@ static struct virtqueue *virtio_ccw_setup_vq(struct virtio_device *vdev,
}
size = PAGE_ALIGN(vring_size(info->num, KVM_VIRTIO_CCW_RING_ALIGN));
info->queue = alloc_pages_exact(size, GFP_KERNEL | __GFP_ZERO);
- if (info->queue == NULL) {
+ if (!info->queue) {
dev_warn(&vcdev->cdev->dev, "no queue\n");
err = -ENOMEM;
goto out_err;
@@ -1388,7 +1388,7 @@ static void __init no_auto_parse(void)
&from_ssid, &from);
if (rc)
continue;
- if (parm != NULL) {
+ if (parm) {
rc = parse_busid(parm, &to_cssid,
&to_ssid, &to);
if ((from_ssid > to_ssid) ||
--
2.13.0
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web