Received: by 10.223.164.202 with SMTP id h10csp3654596wrb; Tue, 28 Nov 2017 15:07:25 -0800 (PST) X-Google-Smtp-Source: AGs4zMZu+hiFRDCbHbVG0DQHUKIeRrYC4TFan5TZdVco0j/3rEFYlBZeuH1U9Ta6vaZ8Ja9iZodb X-Received: by 10.99.115.66 with SMTP id d2mr766593pgn.34.1511910445495; Tue, 28 Nov 2017 15:07:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511910445; cv=none; d=google.com; s=arc-20160816; b=IwHB/3E8snvtlSu5yBGf+mK/WSKEHLH1fCFqu+BygJJNecvnVt4gkpkFyI6f/ZcrDb hgVHf1R3VR9n0nc74VVGqE9rTf452wTsCjwKpZ6YEPKl3VTLWxzxagIr/+dC4vUFksHa IBnvFfDMY4HpxxG3Nx3oyuji26lZq+kG9GeGWBP/HD4KaeYrkbByp34B0iSlAJnY/sR3 w1aM+o78r5HygW5535ax/dkey12irxATnfNJXyROLgui4TiqQTrAPAoYAXTRQGhUPrJt WhsS3d0eIJyjzpqPSgchFZUWLIL+zcC93m3yra7DEhjOg5tn7VBH0hGLmjL9uLnnk5OC Dagw== 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=Bd1FFnzvJskTev9LGhIlUj5IauTQaQ8jhHh4ctfj+8s=; b=CchZqGuNb7DJHzUGrkuDns4SXR4G7kdipCRS+hXySzKHuZ47yVLc1CeS/CAQ+dGdM0 lcVXziofJtv2vUs9rSjlhU2eYVYy56/E5l+ItaHkkrp0aSvAmJFxHGMOczdSJPQkXaxe QOY66qOYuLBVnkuclBIyjQc+5M2grfJyYNy4LDvXwRpl+jKmpV8LReRV5yYNPt3r1cv8 mH+tmvvJxQLFs19NfRjo1U8uiQcVYn0zIFLauJhuBukU4d2tVLII763LX0VCrcVMZlFR cJHlPGSM8H7jgj9Iw0lf7p/7CZ1oScCKxEfB1IjHWVPzgxbVJHZs2dTh9Oixez6/9j24 rtRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c7hE+pj2; 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 z13si190728pgp.767.2017.11.28.15.07.15; Tue, 28 Nov 2017 15:07:25 -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=c7hE+pj2; 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 S1752645AbdK1XFC (ORCPT + 70 others); Tue, 28 Nov 2017 18:05:02 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33228 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751913AbdK1XFA (ORCPT ); Tue, 28 Nov 2017 18:05:00 -0500 Received: by mail-lf0-f65.google.com with SMTP id 74so1742245lfs.0; Tue, 28 Nov 2017 15:04:59 -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=Bd1FFnzvJskTev9LGhIlUj5IauTQaQ8jhHh4ctfj+8s=; b=c7hE+pj2eMDBfhAFgYNAZyyDQHErJuWYYjdrn9dEJkZ7TpxqjqyeUk59SwK/TSvFru rBnNR7aXFuEdKW6B4s4+lCCp3eSaKrIxfd1IP+ndTCaFjuAm2mi5JmRepR+ta6gYNXbm HCdsf/IeM3hFguLo5WbdQAHHSUwtB9DaE+n58Wf19BSjmDllWLt+HCTp6n3NxO+ftusc 06+3SF4Y9gX3B97ZRgKk8BycqXUcqvKrm8+PkqO/zsBk4TU+5YvUL7c7b0Vkr0etvK5p AAknYXreuCKSDbFD85TUxgN+++odSHb/KhkX0FOpM/H9Eyp2Y/pelE9OGsvCEuc46imy 301w== 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=Bd1FFnzvJskTev9LGhIlUj5IauTQaQ8jhHh4ctfj+8s=; b=dGcFjBD/8bdJyOuvkX7ZJ2U0SCoEezHdHkeUUwxWIIXYy0Zvw39dgK3KViEGMcW1ZR pFk8Gi6zX+/rCR2jrh0GLSobacMa7UNGhWGWFUtysd0bQXEzuLPzQJuXTwIb6XZZiL/7 lmUvvMiQ7zD+bt0+yscSi/A8Aee+7/l3fNNF3+dtmMH9mmKQBPtzfQoK4zb2gBCYU9aV LqATjbvZTeN4CQ6/aVdhpsNxgtZIw8PxLxNs8ZdxYmKgFQGDVcTp4IBsuU9zRRzkS6XW rb+7jAJIn2wch7Yw9YdKagX98P0SLQWhgm8U4S82PmLWQLe1MXPW+UrDc+w1k+kdCj0x Iyuw== X-Gm-Message-State: AJaThX5r73eHFNumiaqhOGKXmlDxr5HmTTOfCHKLiKFXPlQHyG5dsLMt 5lU+C227UNLQ+g/m+ICOTkxGt8IU X-Received: by 10.25.151.209 with SMTP id z200mr244422lfd.153.1511910298766; Tue, 28 Nov 2017 15:04:58 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id s22sm58203ljd.42.2017.11.28.15.04.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Nov 2017 15:04:58 -0800 (PST) From: Vasyl Gomonovych To: linux-clk@vger.kernel.org Cc: Vasyl Gomonovych , Michael Turquette , Stephen Boyd , linux-kernel@vger.kernel.org Subject: [PATCH] clk: mvebu: armada-37xx-periph: Use PTR_ERR_OR_ZERO() Date: Wed, 29 Nov 2017 00:04:06 +0100 Message-Id: <1511910248-7716-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: drivers/clk/mvebu/armada-37xx-periph.c:362: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 --- drivers/clk/mvebu/armada-37xx-periph.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c index cecb0fdfaef6..72e2ce46f4b0 100644 --- a/drivers/clk/mvebu/armada-37xx-periph.c +++ b/drivers/clk/mvebu/armada-37xx-periph.c @@ -359,10 +359,7 @@ static int armada_3700_add_composite_clk(const struct clk_periph_data *data, mux_ops, rate_hw, rate_ops, gate_hw, gate_ops, CLK_IGNORE_UNUSED); - if (IS_ERR(*hw)) - return PTR_ERR(*hw); - - return 0; + return PTR_ERR_OR_ZERO(*hw); } static int armada_3700_periph_clock_probe(struct platform_device *pdev) -- 1.9.1 From 1585216688620993881@xxx Mon Nov 27 11:00:41 +0000 2017 X-GM-THRID: 1585216688620993881 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread