Received: by 10.223.164.202 with SMTP id h10csp3639098wrb; Tue, 28 Nov 2017 14:49:11 -0800 (PST) X-Google-Smtp-Source: AGs4zMZNR/BHbGvAODr3AJ94ETV0j633dGP6s+wnr7niQrslf+DuCxJUOIXjQFONUWTu+0g7SaEk X-Received: by 10.99.104.73 with SMTP id d70mr700656pgc.333.1511909351314; Tue, 28 Nov 2017 14:49:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511909351; cv=none; d=google.com; s=arc-20160816; b=PvxRUDigYSB0Rs0iK4y7sj4udHCVmodVt7OpuRAh/oKMjEqH26IkEMPGxEw+E1Cc48 Z6LUhLoSvnxlz6nRmgxc3Y20dMjv57fxIScirjmfW71zsrcrOlLCWFume71R+ejiqsFH 5d+r7dH0teM313KYFVKEA+4+VfeKeLp66EilM55FC0vOI2lpZXF9i+39pR6qhUk60Cbq Cca7+pgjgzhKU/RJosx3nIbU8y3i2t5a/l5qHeC8ZM3EcOsU6W37Kv3ygqC33esOHC6w gIjKkUhVdlOlrQlOGsLizB/nMI73oF4+ztx9GOTtoJk1HKKizvpyMV1jppn6l5KCWISO dWSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=eYwUMQjctD9gG3JkldlqzhQ9oBteOjCNzqjjz+mhZ7g=; b=ZWRIb7UKEdPBw1WaPZ+lyPkYQAmRVJyfgTYx1fxWNFEnDcskBrQqE1CX+mbRzjTlfw CrC0OFEOMn2yY6T5qHbbrfb7c9+PIf3QecFDmFs7tgnEyaR2o/ETgloIen0RPn43z0kd oj+4D8ghFCCfuCJLcPxiO1HJsC83cEZ/VvO/Fo+jJfvDiRwEbx+mY8/UavgqgnCiyea1 mAzF+6k3OCvr2+IcwwlFMbcT48Mlhe3LANQicowqWR7lbdzAH6W0CGqSsrG2D2A62Aaj xXeCt6ZGPTl++1TuC+MSNYG0U81bOnuJvmuiAduMa3xEeYRSdtDzhE/I1zSkSHBTzAA1 wgXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=chYJqQOy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si175746plb.550.2017.11.28.14.49.00; Tue, 28 Nov 2017 14:49:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=chYJqQOy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752795AbdK1Wsa (ORCPT + 70 others); Tue, 28 Nov 2017 17:48:30 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36989 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752600AbdK1Ws1 (ORCPT ); Tue, 28 Nov 2017 17:48:27 -0500 Received: by mail-lf0-f65.google.com with SMTP id a12so1686575lfe.4 for ; Tue, 28 Nov 2017 14:48:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=eYwUMQjctD9gG3JkldlqzhQ9oBteOjCNzqjjz+mhZ7g=; b=chYJqQOyqMlOLxFKvFYeB6B4UcTmPgR7gcQ2LrS1FjucbWfF4wponM6R8sS9vXyq4q QdIW/gQ0FH/xaXlAKj50LTD5iOaubVjrSDTmyVw62+QsbPihhJLa8rnOn0hekMSDf74e rY0pdFqic1aZI9NUIhcB7Q6FLIyHVpTJGW/uQFFJtHBjmghcpP8d7DZtcp4jbFvewlb5 oz89eyVV9l+4Vy0mC6HYiSUlJ+EgOp4C1EI3mn8GEp2HkPFVMPTpZEK0z+ucXyLbRKXH 7wAPzsveJeKk08M3Oc2o7bXOFGCp7bhQbZseOcrB13raVMwSQqKk9TYlmdC7CVM6hhcy 0nog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=eYwUMQjctD9gG3JkldlqzhQ9oBteOjCNzqjjz+mhZ7g=; b=WXFPSgy6uP+5AYcAbC5hD1N11QiSB2UB88HmnI5F7Vigmo3NFC4WrfTtdl3amuZxbI 2k2BONkTd0mAXWyv6Igje0J+VzsgGRJeIFV+0sJrHJ5RPtRAX3hTJ0DHnBgRTKCf4DcP HXO6K8WJUIraQfVxxj9lXlHvh1PkkluHt/7wD1Jv8UkjsGcQTwMy7YmAr4OwQMwo7Xoo KrEnbaGkrsuZ01aS6S0Xp3nleXZxahQwrhtqPD8pCrYvZ5HilL4Nu08+Ss+gGgdPDHz8 n9hx2lQ0dORAMeIxKCdHQTL3XW3W47F0fkPC7dXfvIi5OXfiHiNcILJKLJSEtovxKKWk kfTA== X-Gm-Message-State: AJaThX4X7qdEohMtnkd5ZD0o3eq8Dbsx/d3VHtwnEG0nTJfvHu3L1BK/ v2Lqp26cVWE7WuaxNvYWXIsUxdJe X-Received: by 10.25.202.14 with SMTP id a14mr243466lfg.83.1511909305766; Tue, 28 Nov 2017 14:48:25 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id l136sm41134lfb.46.2017.11.28.14.48.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Nov 2017 14:48:25 -0800 (PST) From: Vasyl Gomonovych To: christoffer.dall@linaro.org, marc.zyngier@arm.com, eric.auger@redhat.com, andre.przywara@arm.com, wanghaibin.wang@huawei.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] KVM: arm: Use PTR_ERR_OR_ZERO() Date: Tue, 28 Nov 2017 23:48:17 +0100 Message-Id: <1511909297-8585-1-git-send-email-gomonovych@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix ptr_ret.cocci warnings: virt/kvm/arm/vgic/vgic-its.c:971:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Vasyl Gomonovych --- virt/kvm/arm/vgic/vgic-its.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index 1f761a9991e7..28d85754320b 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -1032,10 +1032,8 @@ static int vgic_its_cmd_handle_mapd(struct kvm *kvm, struct vgic_its *its, device = vgic_its_alloc_device(its, device_id, itt_addr, num_eventid_bits); - if (IS_ERR(device)) - return PTR_ERR(device); - return 0; + return PTR_ERR_OR_ZERO(device); } /* -- 1.9.1 From 1585872664041184990@xxx Mon Dec 04 16:47:08 +0000 2017 X-GM-THRID: 1585871710544726925 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread