[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180617134532.1070-1-stefan@agner.ch>
Date: Sun, 17 Jun 2018 15:45:29 +0200
From: Stefan Agner <stefan@...er.ch>
To: Takashi Iwai <tiwai@...e.de>
Cc: Stefan Agner <stefan@...er.ch>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] ASoC: codecs: PCM1789: unconditionally flush work
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 <stefan@...er.ch>
---
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
Powered by blists - more mailing lists