Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3480894iob; Tue, 17 May 2022 00:29:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4zZROLRRb6tFOjBupSnOzHN1KT9dDihB1aYtCzzS9zP6L1TmqIaDJ+C/oW+hNgPDGJNhq X-Received: by 2002:a05:6402:518c:b0:428:434e:a5be with SMTP id q12-20020a056402518c00b00428434ea5bemr17369935edd.177.1652772551776; Tue, 17 May 2022 00:29:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652772551; cv=none; d=google.com; s=arc-20160816; b=GXozG3YukvhEvBdFwD6Bb4qwYl+lsQn2NQGoKG1wPojbPnPToyqqk4wAJWim9podgQ MoqtmdN8Cr81h171rIzfeONadlciQvCh1zKQBYYZ/B0wrBGjqyn6OEFuRC0IQF2FpFt+ Xo6Kc0+oUp6BuWl1ugg5kpbYfhhzM5Xpppbm7vUMyuYyos8esgRYVgGqcbNVqQ7J2VZ7 IZ4Mlri5rQq9bJPtnBRO8Gs0R1su+Yf3mQ9gPIdy/TMeYw8kNyQ4dfZlf5+TAH7FjX5R FZXYPHHU3idiuZSs7UoR2v/YIuFf7aBYBgec1kACUIkADbfLazHiiS+6qrXVhlyPnGPM Ts0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hxd7eLnFBnZ/Rq34pqmtOhmXz09WYv3YBBHEc2lj9Cc=; b=BEtTzcYq7MNLryBvgEcBGBr8TGGOEllx6yRgi/JwQp26JDb6Coolxs16p9bnssB04q 8tv01C5rtGaGjFMfSdc1RUGoGBA40d/xiOWRe95FvjwgnlDxAlZXmHkiTXn5tBCqInP3 +PIkxSJ93N6ETY3jgDz5aKlgSgbBIHTVviSMi5pJ9Yi9wKt7habZsFbhSiqtRx1kIopV xFRkI51wf+tKraTBvhQPCQEhuuOitsIXgPxERXdBlkrgo7VaNf1F5yl+Vmbij1Ju3TKn Hpmm3L4djJaNnomT46dHHL373JyVvgnhD+sL1OSaVsQ7RJapfjXnd7gJdhukjJu5yGlk zF6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=JMAEbqpj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ek21-20020a056402371500b0042aae3f66dfsi5204528edb.500.2022.05.17.00.28.46; Tue, 17 May 2022 00:29:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=JMAEbqpj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348087AbiEPUks (ORCPT + 99 others); Mon, 16 May 2022 16:40:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349471AbiEPUc0 (ORCPT ); Mon, 16 May 2022 16:32:26 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED8943ED13 for ; Mon, 16 May 2022 13:17:05 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id kq17so30803646ejb.4 for ; Mon, 16 May 2022 13:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hxd7eLnFBnZ/Rq34pqmtOhmXz09WYv3YBBHEc2lj9Cc=; b=JMAEbqpjk2GQB8cxV89W/ZM7dJMlTCtwY6E8HYMyIGRyYIL01pLt3i7so9JkSPyzaI EfSAJ/toEX9h4fKY/xLsm2rFoFdurG4NBR8f0+FBa698CG60POD/yrpjoyKN8sy6AAOp c5TL8c++fd+dYS7I3gIMTb0xaaogtLh/EtL7hEKgAlvuWx8LTqGI46Y2vdePIkvXyWAp LOCy+yeSIUf7QK3bm7JSoDfwupR5+MSzSJXnNGDfZbI48Vb38Ac0HybcmpGss8U67w95 DvAgQwd2Vlmlv9opRGgvhTGtlSUgvE2kSp9ajlyo7p36FCl+CQf7c4TPZQDVOpsg36mg Xj0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hxd7eLnFBnZ/Rq34pqmtOhmXz09WYv3YBBHEc2lj9Cc=; b=Ic5pSn7rIyRJxahy+IYOsDdjkba5AE+Hi0NSxSgI7d0gT7TyX/udav9v1xqwTmdZ8k CTVxi5RwVu25RE9cU/86hEqIpOssZAQnKuy2BCI4ESJNVKsV6Enurrd7Nqah8+qxsUSP ByNiWlIlfnLOXGvfhpXjpGcd6TApRK6JYWxy3dUfML3UV4laxnHho3RsWZgRVSPus0cw iEBPm8uNptSsROeiTErrR8yAmanrLtBs3FGZGAbFx97PWzQYazJPnQAfp6xGZp5ubrjL N8H7tESL2pp38xeKuktwyURp/SgRzyPNG0OyOoVNTXaRF23ObLuTXVCWk4zs0lTS64QK D/Ig== X-Gm-Message-State: AOAM530PfzeZfOR6uQ9to1J0OpBlVIWoWTPl7wbExcuXNkRKj5CNNPjl ki5qUyM89wMxMzJ2qSkoB4f2nyvQ1CXcPiC141oLuw== X-Received: by 2002:a17:907:3e28:b0:6f4:3900:78f8 with SMTP id hp40-20020a1709073e2800b006f4390078f8mr17439106ejc.736.1652732223724; Mon, 16 May 2022 13:17:03 -0700 (PDT) MIME-Version: 1.0 References: <20220516085000.9861-1-wanjiabing@vivo.com> In-Reply-To: <20220516085000.9861-1-wanjiabing@vivo.com> From: Bartosz Golaszewski Date: Mon, 16 May 2022 22:16:53 +0200 Message-ID: Subject: Re: [PATCH] gpio: ftgpio: Remove unneeded ERROR check before clk_disable_unprepare To: Wan Jiabing Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 16, 2022 at 10:50 AM Wan Jiabing wrote: > > clk_disable_unprepare() already checks ERROR by using IS_ERR_OR_NULL. > Remove unneeded ERROR check for g->clk. > > Signed-off-by: Wan Jiabing > --- > drivers/gpio/gpio-ftgpio010.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpio/gpio-ftgpio010.c b/drivers/gpio/gpio-ftgpio010.c > index b90a45c939a4..f422c3e129a0 100644 > --- a/drivers/gpio/gpio-ftgpio010.c > +++ b/drivers/gpio/gpio-ftgpio010.c > @@ -315,8 +315,8 @@ static int ftgpio_gpio_probe(struct platform_device *pdev) > return 0; > > dis_clk: > - if (!IS_ERR(g->clk)) > - clk_disable_unprepare(g->clk); > + clk_disable_unprepare(g->clk); > + > return ret; > } > > @@ -324,8 +324,8 @@ static int ftgpio_gpio_remove(struct platform_device *pdev) > { > struct ftgpio_gpio *g = platform_get_drvdata(pdev); > > - if (!IS_ERR(g->clk)) > - clk_disable_unprepare(g->clk); > + clk_disable_unprepare(g->clk); > + > return 0; > } > > -- > 2.36.1 > Applied, thanks! Bart