From patchwork Sun Jul 16 21:11:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9843701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 126E860212 for ; Sun, 16 Jul 2017 21:12:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1369328408 for ; Sun, 16 Jul 2017 21:12:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0878728414; Sun, 16 Jul 2017 21:12:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51B1228408 for ; Sun, 16 Jul 2017 21:12:35 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id F2814266D82; Sun, 16 Jul 2017 23:11:42 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8F9E2266A74; Sun, 16 Jul 2017 23:11:39 +0200 (CEST) Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by alsa0.perex.cz (Postfix) with ESMTP id 42CC2266A74 for ; Sun, 16 Jul 2017 23:11:36 +0200 (CEST) Received: by mail-qk0-f196.google.com with SMTP id v17so16284592qka.3 for ; Sun, 16 Jul 2017 14:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AwkHTW8C2HyDv0U2LQ00fjH4TPlN6I/pW9mgse+tNZc=; b=nXNhFBfNZ32MHHl/0AIoSS9sk7FXz+VJHDo66PUCqXL8a2OFWyahpAX22dTmunpb4/ iKF92Nj1E/qSjyiPn5N2csTq3zSsFqPft55snlLFwTyqAIaMObguW98FDDDix5wXWlKj iayOIBKhZvYJPQWKDzD+FT+9dLTHleV3GJGU0+s7qGaG+EFly1h2zwz2mHu7oexHDHEG V02QI0Gu6tXWeL4IWEZMXItWad1Sqpr1wBa+2tFa7N5DB7oPsHOsFhZCXIm44OiwMGJn UovfbarOAbNctT37OZV+bATLcd4SUAYU/cYOgnsU0yrJ+0YaTTfH4Pq4csuaRy1csuEp U4Jw== 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:in-reply-to :references; bh=AwkHTW8C2HyDv0U2LQ00fjH4TPlN6I/pW9mgse+tNZc=; b=YDahr5dsBzUXuA7/AtqRmMQmVwFUfo8d4nCcJFKIC3GNG84BKgWHqlaQUEct/GsIkP gUwgvjhj+zVBXrc30yKM+KKXdN/z4AMNgiLOKNktWQFv5rCRzQ+YhjfXtgD5Y5DmFW2b hwqKa/koldBhpSUHDyzIpLyya+3jWgD4Gg77UnjA0KSzkB3Oxv0rh0FBef2SySzekgcv e00gBZYvWVe2OpAQRmi2p2g6s2KucvwUihrfQfeEEopYTKG421HhJOXum/5+5bo/9L/l ObqsDG2IUE8eWgTVLB6dNcWDtpXDGoPMAJqq2Xp9A5ifbNCsTT/OIHdCCvdsxcZUxIUb T80g== X-Gm-Message-State: AIVw112wUDJ8GOLoJFXhd6cnQPpegwSMuPY9/C9wnonmFEKzzrDSCH1H pim1rzCT4lud3fLo X-Received: by 10.55.167.23 with SMTP id q23mr15613766qke.252.1500239495548; Sun, 16 Jul 2017 14:11:35 -0700 (PDT) Received: from localhost.localdomain ([187.180.181.24]) by smtp.gmail.com with ESMTPSA id u67sm10911626qkd.67.2017.07.16.14.11.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Jul 2017 14:11:35 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Sun, 16 Jul 2017 18:11:10 -0300 Message-Id: <1500239473-14886-5-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500239473-14886-1-git-send-email-festevam@gmail.com> References: <1500239473-14886-1-git-send-email-festevam@gmail.com> Cc: Fabio Estevam , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 5/8] ASoC: cs35l34: Remove unneeded gpiod NULL check X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver. Signed-off-by: Fabio Estevam --- sound/soc/codecs/cs35l34.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c index 0a747c6..dade899 100644 --- a/sound/soc/codecs/cs35l34.c +++ b/sound/soc/codecs/cs35l34.c @@ -1138,8 +1138,7 @@ static int cs35l34_i2c_remove(struct i2c_client *client) snd_soc_unregister_codec(&client->dev); - if (cs35l34->reset_gpio) - gpiod_set_value_cansleep(cs35l34->reset_gpio, 0); + gpiod_set_value_cansleep(cs35l34->reset_gpio, 0); pm_runtime_disable(&client->dev); regulator_bulk_disable(cs35l34->num_core_supplies,