Received: by 10.223.164.202 with SMTP id h10csp4563912wrb; Wed, 29 Nov 2017 08:16:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMZHoBvwkfFJAvtePqpHDlZuLK9uNDGBXR+im33YrhIEbWyGi+uDprw+Whr9X3nrR5vNSAff X-Received: by 10.84.132.106 with SMTP id 97mr3454645ple.44.1511972208045; Wed, 29 Nov 2017 08:16:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511972208; cv=none; d=google.com; s=arc-20160816; b=JXvt3kL9ihaRTeTQrVe19ErvO/6T7CYeAzWrRg+jAFWcmY+UktVuMhilZDmDTNWVt6 WhYu+PhKPvS1M7dPOllwpeF71uguRXkvyPmtV7fYJ5McKrMJF2qenMaNqCHXhtCjO7F/ rU6EWTgMBxlKevZ4tFLBbbUth7jd1mbRbORIfKuanZARqU/8SKc7vYrwcj8oYJJeqW1d M60h4JO3fxtqLf0XXL4oVd0H6Lt9dXWVQLDV9HfZZ3RALKw6MBmX6VwR8FtxZdQ2cGnN k/bhL03KAQX+soDd2AXM3yMbhbXaQ4pQ9aoYG3tZJoAoQw6wRujS0/1nvA+6T/9Sr8pv B+0w== 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=rk/PZaxf8C6SKmQvyxv8s21C7SAOHNO/JHmYsuTlYfs=; b=hxfwdWqvhhgy1mrgVZ4PC09FGuMdaUrccmh/dhfBsSa8MFvAjD+yoEwM1YiiPykswt X9aRT5Ik04JR8IyMaRKg3y7YGM2Xb2lLHljO3RWzTn9yRT18Yw8SNQSt1dyz+AA6mKoD xex2F841gpEIyeTMTWRPXHvHGlYyndwIAKB2mVjJpCQ8NYyGEP2qvGCSfTRh7/wEV+mm gy9ZHENV4NnrWolOOFdjb4tawp6z1U5T34uG+BwUPBY1lbxqzTMiR4rj78Sx09v/7/lm GiGWg7Y27cGXdxpf5pJjh8yfMpiTN+OD9l+cmZPdeR82ioF5emPLKyhv/2NDRwsK/13R +1ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X1eUxQwc; 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 n10si1454238plp.150.2017.11.29.08.16.36; Wed, 29 Nov 2017 08:16:48 -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=X1eUxQwc; 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 S1755541AbdK2QP5 (ORCPT + 69 others); Wed, 29 Nov 2017 11:15:57 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34357 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753244AbdK2QPz (ORCPT ); Wed, 29 Nov 2017 11:15:55 -0500 Received: by mail-lf0-f67.google.com with SMTP id x20so4540826lff.1; Wed, 29 Nov 2017 08:15:55 -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=rk/PZaxf8C6SKmQvyxv8s21C7SAOHNO/JHmYsuTlYfs=; b=X1eUxQwcTEp6rwSqcCLes9m1rnt/qXn1reYlbwFSRukBwtxoyf2ZBIACoP3oS43aYO hjbK9YDvZffe4qdK2Fi/u0w587qNPtEIfAF4K9oockD68OmWEX5tuQrvTdagU2Gh4Uou rkxVC4cK2jMG1TBPiTrZF4145qR6DkFH1orUqpu6i82RmgCnlpIBzXVsMxHmJo4zFom+ QEz8RE8nJP2AvMLgCrfdNErSxMLh1mI6k9Gdlwgvg4MEtrFnOVce6DV8Ia9u1J7B8huE Q5yxNzL/0kC+9lwieaxWe3JCre98UQjCs+PlCNj6AWZMmaHBtdH785jXOg5m5AicZQD+ HaEw== 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=rk/PZaxf8C6SKmQvyxv8s21C7SAOHNO/JHmYsuTlYfs=; b=n0skBBK0ixYCLZtVjtGXjAusb+mYm1PTgz4MEzNcsaqBi/EfPf8ummgXQb1fuBMx36 cqu7LskaijMaoahNZsXaAE0uTjphhoM0m53xrIBBTCDD2ZAJjmI3sDQX/5UH4pA/ettz V5g2Vd0ZgBefUGKzy+1SV+W4s8Z4oStQ7MkBU2XOsx75fPaV1afnVSdSEs+4MvqwGrTa 5vkWh0xFLGF5CLMDT5JmWXjoXhwws4uWHPdHci6xgVZ2JDd4+VC9ZUMMpeTCHY9aWWeM 49nOOjHcxyT2Hopfa0ae1vFsVvzigF6dEUuJRImC37B0IWLdv/kF7a56CvZ+MtA8HOsE 1KYg== X-Gm-Message-State: AJaThX6YebgvDXU+2gPnZXLB8ONvntJwgpr4vfzzwnygyd7vhBMEMNH3 ytidgwW+Qv0EHqCHb8JxFErtktve X-Received: by 10.46.20.4 with SMTP id u4mr1676832ljd.38.1511972153825; Wed, 29 Nov 2017 08:15:53 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id b80sm353459lfe.69.2017.11.29.08.15.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Nov 2017 08:15:52 -0800 (PST) From: Vasyl Gomonovych To: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Vasyl Gomonovych , =?UTF-8?q?Emilio=20L=C3=B3pez?= , Michael Turquette , Stephen Boyd , Maxime Ripard , Chen-Yu Tsai , linux-kernel@vger.kernel.org Subject: [PATCH] clk: sunxi: Use PTR_ERR_OR_ZERO() Date: Wed, 29 Nov 2017 17:15:43 +0100 Message-Id: <1511972143-16028-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/sunxi/clk-sun8i-apb0.c:101: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/sunxi/clk-sun8i-apb0.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/clk/sunxi/clk-sun8i-apb0.c b/drivers/clk/sunxi/clk-sun8i-apb0.c index ea1eed24778c..d5c31804ee54 100644 --- a/drivers/clk/sunxi/clk-sun8i-apb0.c +++ b/drivers/clk/sunxi/clk-sun8i-apb0.c @@ -98,10 +98,7 @@ static int sun8i_a23_apb0_clk_probe(struct platform_device *pdev) return PTR_ERR(reg); clk = sun8i_a23_apb0_register(np, reg); - if (IS_ERR(clk)) - return PTR_ERR(clk); - - return 0; + return PTR_ERR_OR_ZERO(clk); } static const struct of_device_id sun8i_a23_apb0_clk_dt_ids[] = { -- 1.9.1 From 1584879876847765154@xxx Thu Nov 23 17:47:13 +0000 2017 X-GM-THRID: 1584415706904700430 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread