Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stefan Agner and committed by
Mark Brown
a7dc662c 0ddce71c

+1 -2
+1 -2
sound/soc/codecs/pcm1789.c
··· 262 262 { 263 263 struct pcm1789_private *priv = dev_get_drvdata(dev); 264 264 265 - if (&priv->work) 266 - flush_work(&priv->work); 265 + flush_work(&priv->work); 267 266 268 267 return 0; 269 268 }