Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2895783imm; Sun, 17 Jun 2018 06:46:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL4LdYj/uA9SJCHi7C14C0c8thfibFUhiT0BtP5a/QKnWZeVoy0PnKe2Wea1hRHIeTDzCRO X-Received: by 2002:a63:24f:: with SMTP id 76-v6mr8099037pgc.252.1529243172400; Sun, 17 Jun 2018 06:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529243172; cv=none; d=google.com; s=arc-20160816; b=jaJgb7Kxr7YsxfhKsSPmOFpqZlHfmB6MqmMIg6xETNlra2TQeiZ5Q3cTuCXKCE9FU7 7/EEi2hiSDs9KayhbQf7kV1MfNYYyhccu1FXWUOUAvkwDQKmEu+vHgu98gB905o8K47B kXD7sLF1vwRFIEfvkUfUQVkIQfenVP8pTzdNjz8WG9JCL99yV6dZT6E+g9yib2jt5fEX OyvBt53MU6zLeBHdq9lG10oTGdkOTM6Iujyp3APaXM37IXoJ0F0ZzukT9BjP8rVKVjpK UI9upeTUDLzIVKMLSyrHCnOborb7A/rEZ4pelhzbUoJNyZHyTa/dR1VGbdKLVmGHmC9c e94g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=sk6Fbjh5a8Kv6MrDZ2eC/sOiWjq3V+FEVhVk2bKQvfU=; b=K0NsMrKJC6huOTQEITBNdqCA2P3SdVsCN02kaEFKZskVxBMGf1LtSra0BfWmgORslj ioteojtYvIVpPtH/xw2K5I7cSBsmMW7RDDcPXRIG2Cc/79i3RLYnpjHFxe8c1zx8mK8s 2v2fY4jWkaUa0W1RaYl1sVyJI1gaE0iwoc44ab6jiuYt3+9wra/z2PtjnrXO+V9gVolO 4OXTXisQROpEpVwjmDjZTwAPO/0wpqR+T67JeCel23ZOS69DBow1LzkRNp5/uo6SQiuQ 9RD7XxjUkZBP2EZqJaOXcjmApXSb/Z9aihP1qBWIL6TgJV8z+we37/tYqOy8PQ5497nr 8YPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=hk7OtWIB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x6-v6si12464133pll.24.2018.06.17.06.45.57; Sun, 17 Jun 2018 06:46:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=hk7OtWIB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755235AbeFQNpf (ORCPT + 99 others); Sun, 17 Jun 2018 09:45:35 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:47028 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754339AbeFQNpe (ORCPT ); Sun, 17 Jun 2018 09:45:34 -0400 Received: from trochilidae.lan (unknown [37.17.239.3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 7852E5C00F6; Sun, 17 Jun 2018 15:45:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1529243133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:content-type:content-transfer-encoding: in-reply-to:references; bh=sk6Fbjh5a8Kv6MrDZ2eC/sOiWjq3V+FEVhVk2bKQvfU=; b=hk7OtWIBqL6awwP8n4MtzdptR3W+mEBJa8lVhJ2XxXiXEGKAjEPYQgeMRnTs3JBGzWHQWE GmsRjGjmSPxiYdofAvqXVLGJDgDGd8AUKMIxPWhWiuPvqlPkL6X+NffKPEpb696Bj/grXE 1+UZjGKP6IgsTzFRqHe8ATAHQEE1jc8= From: Stefan Agner To: Takashi Iwai Cc: Stefan Agner , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: codecs: PCM1789: unconditionally flush work Date: Sun, 17 Jun 2018 15:45:29 +0200 Message-Id: <20180617134532.1070-1-stefan@agner.ch> X-Mailer: git-send-email 2.17.1 X-Spamd-Result: default: False [-2.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[8]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MID_CONTAINS_FROM(1.00)[]; ASN(0.00)[asn:13030, ipnet:37.17.238.0/23, country:CH]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Work is guaranteed to be initialized on exit. Drop the unnecessary if statement and always call flush_work. This fixes a warning seen with clang: sound/soc/codecs/pcm1789.c:265:13: warning: address of 'priv->work' will always evaluate to 'true' [-Wpointer-bool-conversion] if (&priv->work) ~~ ~~~~~~^~~~ Signed-off-by: Stefan Agner --- sound/soc/codecs/pcm1789.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/pcm1789.c b/sound/soc/codecs/pcm1789.c index 21f15219b3ad..8df6447c76a6 100644 --- a/sound/soc/codecs/pcm1789.c +++ b/sound/soc/codecs/pcm1789.c @@ -262,8 +262,7 @@ int pcm1789_common_exit(struct device *dev) { struct pcm1789_private *priv = dev_get_drvdata(dev); - if (&priv->work) - flush_work(&priv->work); + flush_work(&priv->work); return 0; } -- 2.17.1