summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorStefan Agner2018-06-17 15:45:29 +0200
committerMark Brown2018-06-18 13:54:38 +0200
commita7dc662c6a7b9209df600c64b16d33d72dbf56b1 (patch)
tree03fa7f33d92df10e0b01cde5a0bc340848114aa7 /sound/soc
parentASoC: rt5682: add rt5682 codec driver (diff)
downloadkernel-qcow2-linux-a7dc662c6a7b9209df600c64b16d33d72dbf56b1.tar.gz
kernel-qcow2-linux-a7dc662c6a7b9209df600c64b16d33d72dbf56b1.tar.xz
kernel-qcow2-linux-a7dc662c6a7b9209df600c64b16d33d72dbf56b1.zip
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@agner.ch> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/pcm1789.c3
1 files changed, 1 insertions, 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;
}