Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757738Ab3CYN0x (ORCPT ); Mon, 25 Mar 2013 09:26:53 -0400 Received: from mail-ea0-f171.google.com ([209.85.215.171]:65007 "EHLO mail-ea0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757192Ab3CYN0w (ORCPT ); Mon, 25 Mar 2013 09:26:52 -0400 From: Alexandru Gheorghiu To: Rusty Russell Cc: "Michael S. Tsirkin" , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Alexandru Gheorghiu Subject: [PATCH] drivers: virtio: Use PTR_RET function Date: Mon, 25 Mar 2013 15:25:35 +0200 Message-Id: <1364217936-6284-1-git-send-email-gheorghiuandru@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1041 Lines: 32 Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/