Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp457290ybe; Thu, 5 Sep 2019 00:08:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQHvzuAxujOb86PlJ4cO5qP9Zq/zEIP+zaMvRetFf2kmIAQEfO387Zsayno11YUaUhj6Db X-Received: by 2002:a63:ee08:: with SMTP id e8mr1868100pgi.70.1567667334228; Thu, 05 Sep 2019 00:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567667334; cv=none; d=google.com; s=arc-20160816; b=T2MBMryXKQvDujcbvFOFzuJ+csbhlwYVBUzJo8I7bEo8AQaj9auyKEKt4iEsxicnqf KYUWcWSEdkFzMom3QDUQTu4KHsOmbGwn79TGiflxCO5itT1HPrSIiCQJQxytefuzK/6L pA9Wmm2mDLuLns4xLdROEmxf2miC9mMMIzWO73GFfZU2leGRcwa+fCaZ76QS0Q82Qoni 0BNsOIis0YRIyBNsR3JTp8nTH2wqmSflLfqzvqnd+iI5xGOX2aTSc2CuZ9mWNaBlWmgA FrffMQXoAoYHf/RljJMUQ03kQNBj90WUtznfsW3qb+uPMzI8cQYmlMJfTu01ca8uB6k9 Hr6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=O6srC8W6Sp3dqDdqB2QPkSot8Rdx5feWZ8EYiEjySN0=; b=OPDm/ho+rSH8UmFaE89YZ1/FKa8twaPP+sMwR3AWoPB+5LwhspdC5Cam7A1TkGSZLv A6ub3EeMZsTBCwZbI1MOlBXjODTcnOY+23f8JOQwOU3X4OAp0Qhb0v35w4TjBjLarqby iBA2Uk7NsMhoqt8XmkFb9RCL2qdREMdSRnETPaTyZvyZBI94VZpZHVIY+XYl9lp7WpGv 1DK9l22b/6KKtQQWo+ckC7XNbjoP/5wkr6TiwN4/g1IUzZkjSzSL26xQWmDENVlYHhgS Z2X3bP7A1p8U5vCcMFXK8roBDFKElsg9nANoD9Rxpp8HN3gWp/8NIVduUWRvw+KBohgz 0CTw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l71si997112pgd.314.2019.09.05.00.08.38; Thu, 05 Sep 2019 00:08:54 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731306AbfIEGq0 (ORCPT + 99 others); Thu, 5 Sep 2019 02:46:26 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6678 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726089AbfIEGqY (ORCPT ); Thu, 5 Sep 2019 02:46:24 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7D494C6F98C930736F07; Thu, 5 Sep 2019 14:46:21 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Thu, 5 Sep 2019 14:46:11 +0800 From: zhong jiang To: , , , , , , , CC: , , , , Subject: [PATCH 1/4] bus: ti-sysc: Use PTR_ERR_OR_ZERO rather than its implementation Date: Thu, 5 Sep 2019 14:43:12 +0800 Message-ID: <1567665795-5901-2-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1567665795-5901-1-git-send-email-zhongjiang@huawei.com> References: <1567665795-5901-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to use it directly. hence just replace it. Signed-off-by: zhong jiang --- drivers/bus/ti-sysc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 9207ac2..6f4c102 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -504,10 +504,8 @@ static int sysc_init_resets(struct sysc *ddata) { ddata->rsts = devm_reset_control_get_optional_shared(ddata->dev, "rstctrl"); - if (IS_ERR(ddata->rsts)) - return PTR_ERR(ddata->rsts); - return 0; + return PTR_ERR_OR_ZERO(ddata->rsts); } /** -- 1.7.12.4