Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1720754
| From | Himanshu Jha <himanshujha199640@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] virtio_mmio: Use PTR_ERROR_OR_ZERO |
| Date | 2017-08-27 08:40 +0200 |
| Message-ID | <uiZoJ-3VU-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199640@gmail.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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] virtio_mmio: Use PTR_ERROR_OR_ZERO Himanshu Jha <himanshujha199640@gmail.com> - 2017-08-27 08:40 +0200
csiph-web