From patchwork Sun Jul 16 21:11:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9843707 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 930A960212 for ; Sun, 16 Jul 2017 21:13:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9589128408 for ; Sun, 16 Jul 2017 21:13:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A91328414; Sun, 16 Jul 2017 21:13:18 +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 E7A0428408 for ; Sun, 16 Jul 2017 21:13:17 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1023D266DBE; Sun, 16 Jul 2017 23:11:58 +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 18398266D8A; Sun, 16 Jul 2017 23:11:55 +0200 (CEST) Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by alsa0.perex.cz (Postfix) with ESMTP id 5EC66266DB3 for ; Sun, 16 Jul 2017 23:11:44 +0200 (CEST) Received: by mail-qk0-f193.google.com with SMTP id z22so9781qka.2 for ; Sun, 16 Jul 2017 14:11:44 -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=SSuCJKCUrtz7PkKiLY8lPl+a3I/jo5NtCQMTRo1dirg=; b=Z6D7l+a3F1QSE3ZMqwjn4eXGisOx0Iq9p1Spr2FcqHeemYNGFQYdT0+usQYIkuA767 BrfvGWy20deMgSHbbiO4PbXxJNV1gPQJqriHVhq1pCTwC6u9frOVQ3cjb8MVSWkYsD0F Y/5xz7jNIhi5de9rO/nl19KcQq82oDhompaxXlp5NrTNfJ9imFHPeT8PMxmyfJ4/oslL uR8T7JcUzgKae3DvVOoDftcw2UmLNm7HeiK7/TsVRUZ7mJJyNxlr4Nulo7luVn5eFgUK 2mb615lSVDp8/aHY9UR12NJGW3Dfvjq2GICDgJptqVP14GbzuKjEuAsAJzsJGubZ7dxQ eQWQ== 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=SSuCJKCUrtz7PkKiLY8lPl+a3I/jo5NtCQMTRo1dirg=; b=Crfe0FiyWeW1Xe9dG9rOggyIQWBb8YbMFfovgfRLDUzo4kovXZ7qsebGoLxth3Dwav RL4XwZo5tbd0+gjYx38onOnwoBUtTi2P6ROYxxJWMAStOWwmmIKHQo3lrrOjs82vtsMn TQ7Wnp2jdUebO1sMsaqJ0XgH+QIL+IRDGByRubBTa/X3F2X7nTSH5pw2UzlQHalknjc2 Ue5wLVGqzUmnPhG6VzJluDxj4dUjr5P0qYrNZisZKbPX/ufmlfMksyG6qdhE2P+WEz2O g33o1CNepbNJwvujB8lLxfqoufYbJXyWJLwMyk9Y/yxL2BFEBAxAZXBK1xx0ZqjkIAOd ESzA== X-Gm-Message-State: AIVw111+T01iQXC/38xQT+QOT9UHagVvZf8CC7Lg7lQH+3GxPIIm1iaR FuOxBi4fxzyge5kf X-Received: by 10.55.178.135 with SMTP id b129mr22822365qkf.189.1500239503586; Sun, 16 Jul 2017 14:11:43 -0700 (PDT) Received: from localhost.localdomain ([187.180.181.24]) by smtp.gmail.com with ESMTPSA id u67sm10911626qkd.67.2017.07.16.14.11.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Jul 2017 14:11:41 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Sun, 16 Jul 2017 18:11:13 -0300 Message-Id: <1500239473-14886-8-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 8/8] ASoC: sta32x: 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/sta32x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c index 0790ae8..5b88847 100644 --- a/sound/soc/codecs/sta32x.c +++ b/sound/soc/codecs/sta32x.c @@ -847,8 +847,7 @@ static int sta32x_set_bias_level(struct snd_soc_codec *codec, msleep(300); sta32x_watchdog_stop(sta32x); - if (sta32x->gpiod_nreset) - gpiod_set_value(sta32x->gpiod_nreset, 0); + gpiod_set_value(sta32x->gpiod_nreset, 0); regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies);