virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: virtio: Use PTR_RET function
@ 2013-03-25 13:25 Alexandru Gheorghiu
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-25 13:25 UTC (permalink / raw)
  To: Rusty Russell
  Cc: Alexandru Gheorghiu, virtualization, linux-kernel,
	Michael S. Tsirkin

Used PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@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 1ba0d68..d1e664f 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -567,10 +567,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_RET(pdev);
 }
 
 static int vm_cmdline_get_device(struct device *dev, void *data)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-26 10:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1364217936-6284-1-git-send-email-gheorghiuandru@gmail.com>
2013-03-26  3:27 ` [PATCH] drivers: virtio: Use PTR_RET function Rusty Russell
2013-03-26  5:01   ` Andrew Morton
2013-03-26  7:41     ` Andru Gheorghiu
2013-03-26 10:23       ` Rusty Russell
2013-03-25 13:25 Alexandru Gheorghiu

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).