From patchwork Sun Jul 16 21:11:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9843695 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 C9B7260212 for ; Sun, 16 Jul 2017 21:11:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB0FB28408 for ; Sun, 16 Jul 2017 21:11:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C00E828414; Sun, 16 Jul 2017 21:11:52 +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 259AD28408 for ; Sun, 16 Jul 2017 21:11:51 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E8C73266D2C; Sun, 16 Jul 2017 23:11:33 +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 4C942266ABB; Sun, 16 Jul 2017 23:11:32 +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 78D66266A74 for ; Sun, 16 Jul 2017 23:11:30 +0200 (CEST) Received: by mail-qk0-f196.google.com with SMTP id v17so16284416qka.3 for ; Sun, 16 Jul 2017 14:11:30 -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=UgTFKFCSmsCZW3TfFsSXEiHMBvWw05Ths+AvSyFhwWA=; b=vavxbyw6zuXx41kFBEExj44Xc+8U0EX6q2WymDP+kbheHWjxniEmE3qkJxVNuUttsu L+o1KKD/LHCypioaUMiMxBFJOVf39O2tMxJGglBwDhkvs+ma86koTC80O/R5hb7qI7rw 8zAcqyBJk4r0CL705YQyXu9+R4Ifunq8Qr9M12RMLTTiLeFMzp1kYsM7gm6H5fT9LB1J UtUB9u+OiphxsPjL0X4fcj613WyK2NppHCWT/MKDyijIYMojjzSpIk9wAObf8Go3U4qo tOUoe8J3VwoLhOsaLabJit6LP3hgvqmHqRyz8P7AndEPHAjrbuPpP5TqpE3rWymNOJBs cZkw== 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=UgTFKFCSmsCZW3TfFsSXEiHMBvWw05Ths+AvSyFhwWA=; b=RPwUX1LAWUVr94nGGtWMf95Plddf8x/5sNWJZNnr6SzcUi8Kt4CI1EhL5by1U5Nt70 ENDShfBl5Sp5xiAhqY26YOm/vfMLt5jd/wRD2kSFYI3p8DXCsSwVG1hGBuKxqmIeYb4j mpJawfANPaBdKCveGjakoznhHdjMuWbw3NEEPKhvYJ/yfhmS3sMF7/Xa6LCiZFGpx/qj Hs9VAVOxnLRvWeq2wWt/qRBlgwQQjnXQ6QH+rpJkOKC9fbdq6dD/CIFIOdVJFZ87Otv4 czZXSOg57w5bxsl4eC0oV7ctJfSvzlJk7GdyR7v36E54FAHj5QEx9Zkrn/r0HmXhYAkW xpxA== X-Gm-Message-State: AIVw110dvjEoHzk7KgUA3CByAWZlc1LQeOsIJMERJy/IpRMas31F6RnG AfwTk0pKXMTcJSr8 X-Received: by 10.233.216.1 with SMTP id u1mr22504408qkf.10.1500239489334; Sun, 16 Jul 2017 14:11:29 -0700 (PDT) Received: from localhost.localdomain ([187.180.181.24]) by smtp.gmail.com with ESMTPSA id u67sm10911626qkd.67.2017.07.16.14.11.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Jul 2017 14:11:28 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Sun, 16 Jul 2017 18:11:07 -0300 Message-Id: <1500239473-14886-2-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 2/8] ASoC: wm8804: 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/wm8804.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c index af95d648..fc69b87 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -623,8 +623,7 @@ int wm8804_probe(struct device *dev, struct regmap *regmap) return ret; } - if (wm8804->reset) - gpiod_set_value_cansleep(wm8804->reset, 1); + gpiod_set_value_cansleep(wm8804->reset, 1); ret = regmap_read(regmap, WM8804_RST_DEVID1, &id1); if (ret < 0) {