Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1733113ybj; Wed, 6 May 2020 04:24:39 -0700 (PDT) X-Google-Smtp-Source: APiQypJqEAI2RLNJKG5FfPg4ojj0znl3FcDUD1fbTIHpYKQuGqj8B8Y4AI9hvq0xvAbSqWlI7DI1 X-Received: by 2002:a17:906:3e52:: with SMTP id t18mr6647418eji.204.1588764279453; Wed, 06 May 2020 04:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588764279; cv=none; d=google.com; s=arc-20160816; b=wL7muD6JRUc1upPk9gneDdUNiNkw2PZzwpcq8Mcrhimz4h9yG/8uxcqOm59gcahVTb CDnXTUcnMVQ0QbxOemZOWW0e67C1M8YZudDPLZONQhaRWlUFETEFvRErAsKHC4bYWuA2 BY8GG3EsJn719Qjr5i/CEkegPwdgEM2ow1C8I/oc6RODwVn6HgfFVF6PGtJkOW/n6GWM GKyco7rj0740Agno85iKn6khiqgsZm76wn7pjFZh0PhuvPsLhTdlpjYo7LB8xKjJhS/+ cSs8D5wWVQPzRAlTeKAkSBy1GyGBzIyLiGfxn9ZX3BcTzdR8FClTxpx4Z81veVnex2AW VCuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=MjauHP26dHrBVT9wo/Bww3GOsjGCJYlq0HYLLcc8NP0=; b=dt1g9R542FOyRbu2s5eG5v/XOxPP3SJScxuvz+Jfp0v65aUs/sJbvxc2gs+/1j+tBI zqy+adZdE5n0DM4Jgbl42/Yq9YubzVwlT6gQdNv56Y+iH1bRPNK0Old04gJdRWoIVbpm +idXikHDOoiAhFKExNsEKS7zAaqD4sMlpHa9CvzyqXnpEeHouxJwnQ8aCqTFMAzXP23g QncZCu2kkGqoq17ejrzNkMdghGNnTTQwZxTtqnJwrc4ASH25P4XT5qgtIhaCEzEeAiy5 NzXeaTzgFxCj4MT+v5evAJVtNtYUMdilhq/ETyKvYtNxlk9+IVjosZy+LCo2kE5x9Cb/ X/7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f4si1023258ejd.83.2020.05.06.04.24.16; Wed, 06 May 2020 04:24:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728364AbgEFIJQ (ORCPT + 99 others); Wed, 6 May 2020 04:09:16 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3859 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728217AbgEFIJQ (ORCPT ); Wed, 6 May 2020 04:09:16 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2A4DF91E451E0C16612A; Wed, 6 May 2020 16:09:14 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Wed, 6 May 2020 16:09:07 +0800 From: Samuel Zou To: , , , , , CC: , , , Samuel Zou Subject: [PATCH -next] ASoC: sun4i-i2s: Use PTR_ERR_OR_ZERO() to simplify code Date: Wed, 6 May 2020 16:15:12 +0800 Message-ID: <1588752912-37596-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes coccicheck warning: sound/soc/sunxi/sun4i-i2s.c:1177:1-3: WARNING: PTR_ERR_OR_ZERO can be used Reported-by: Hulk Robot Signed-off-by: Samuel Zou --- sound/soc/sunxi/sun4i-i2s.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index d0a8d58..72012a6 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1174,10 +1174,8 @@ static int sun4i_i2s_init_regmap_fields(struct device *dev, i2s->field_fmt_sr = devm_regmap_field_alloc(dev, i2s->regmap, i2s->variant->field_fmt_sr); - if (IS_ERR(i2s->field_fmt_sr)) - return PTR_ERR(i2s->field_fmt_sr); - return 0; + return PTR_ERR_OR_ZERO(i2s->field_fmt_sr); } static int sun4i_i2s_probe(struct platform_device *pdev) -- 2.6.2