[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1503815879-9577-1-git-send-email-himanshujha199640@gmail.com>
Date: Sun, 27 Aug 2017 12:07:59 +0530
From: Himanshu Jha <himanshujha199640@...il.com>
To: mst@...hat.com
Cc: jasowang@...hat.com, virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org,
Himanshu Jha <himanshujha199640@...il.com>
Subject: [PATCH] virtio_mmio: Use PTR_ERROR_OR_ZERO
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: Himanshu Jha <himanshujha199640@...il.com>
---
drivers/virtio/virtio_mmio.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 74dc717..fea209d 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -650,10 +650,7 @@ static int vm_cmdline_set(const char *device,
pdev = platform_device_register_resndata(&vm_cmdline_parent,
"virtio-mmio", vm_cmdline_id++,
resources, ARRAY_SIZE(resources), NULL, 0);
- if (IS_ERR(pdev))
- return PTR_ERR(pdev);
-
- return 0;
+ return PTR_ERR_OR_ZERO(pdev);
}
static int vm_cmdline_get_device(struct device *dev, void *data)
--
2.7.4
Powered by blists - more mailing lists