From patchwork Wed Jan 31 09:34:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10193597 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2F84560595 for ; Wed, 31 Jan 2018 09:35:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 193AE1FF60 for ; Wed, 31 Jan 2018 09:35:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DF1C283C6; Wed, 31 Jan 2018 09:35:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 945AA1FF60 for ; Wed, 31 Jan 2018 09:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BL5B1ZfMiKt6Ko6D07jkoeaFCTvHcujSufuykFeItLw=; b=dCftPjSC9OaNTrv3dEJGlMoim0 e+tEm/BfGpUd58D2d13ySN69UJfnueW8foOLAGjh2BsZlAgzM/IVOp13xOfC3leUWhFEbyyOB3gdu 8j23Q7RlPUZXC2vX/lLHgiQSskczLUdor2sGzL6jyEck5Hqh24QAuqb/WpjUcQCorRYxI0sy+7ueF hhOqdHOQ+SQ8L7ChL4/t2fkgMJdqFplqFB00g1ZRGUCbzRbf+xBY8oljQnvO+cy5b51Evonsv0HaO bP7/W8MgvCI62yLal6DiwigtiqJ+Tnx3T0caLVnshm1PG5EPdWilngnXWdUEmb50BFAsFbwt2ZvL6 Y6w7gb4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1egonh-0005Ze-71; Wed, 31 Jan 2018 09:35:29 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1egond-0005YF-3n for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2018 09:35:27 +0000 Received: by mail-wm0-x243.google.com with SMTP id f71so6717534wmf.0 for ; Wed, 31 Jan 2018 01:35:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=o5JlWh61SlUv1vPzW8GNv4CKrXQkGJ6dGylg33qXa8k=; b=D5Bv7+jrCYPWXBTn8Ef/6F7cNhszsIO/HdgyihP8Ucb05Bc9N6+rbBkgmm4w1nRWlT 2WSY0euQSq0dXGowBd4JUiFWt9kYbGszQYFx/jfJvmcrh0z9jkXq8nIZNBDcP6tsbG0G D0UPEhrRN76zF5Dk7mYcSe7EuujKODHlDIwEs= 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:in-reply-to :references; bh=o5JlWh61SlUv1vPzW8GNv4CKrXQkGJ6dGylg33qXa8k=; b=dGq5zZUrxX5NErFDBIHBwl2pfQSgBrHjeONY+TOeUUyC4hPIC8OZ4cxb3vuU6IF3Ew 5+dM6Ixbi0b01nmEPaDY2eacnFFGzk+lqzMh62uRL7d6Rt3GbuyXWww4vaPwH+AEioB2 qulDhb6kwm0rDvL+WUCAqSqw/N6vNoEtx4UcYJ/Q77Mtwl0t3vd/4Kh6nfGDzh7CD+GI GZ127YIG1vGPqN97sL2ROMrS7Oht9rUqQtl1n55/wZlpDRHmHrgW2nT2XI6wq2t07ArZ zvtpwIkEwKsbSQzPemhmhz0Z9Z52xTxORfhSjDP3y62dSztymt6+zghdw1rN2t6cw2tc tYzg== X-Gm-Message-State: AKwxytflKawI+eIsvssQjbJhaF14XtniIPdl5K4NQFv3pPGfrLTr+JnS J2o3VmRdGRUfZoxyjOWnQ0Mk7g== X-Google-Smtp-Source: AH8x225mCfZnE54++FdGhFW2pkFKb7byJ+Ddc0VY80yxAgkyf8bEWlxa2k/cYOkzBGo1Qe57AYCQNA== X-Received: by 10.80.144.53 with SMTP id b50mr55104677eda.265.1517391316062; Wed, 31 Jan 2018 01:35:16 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id z2sm10247837edc.50.2018.01.31.01.35.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Jan 2018 01:35:15 -0800 (PST) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 02/28] KVM: arm: Use PTR_ERR_OR_ZERO() Date: Wed, 31 Jan 2018 10:34:41 +0100 Message-Id: <20180131093507.22219-3-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180131093507.22219-1-christoffer.dall@linaro.org> References: <20180131093507.22219-1-christoffer.dall@linaro.org> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasyl Gomonovych , kvm@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Christoffer Dall MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vasyl Gomonovych 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 Signed-off-by: Christoffer Dall --- 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 8e633bd9cc1e..465095355666 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -1034,10 +1034,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); } /*