summaryrefslogtreecommitdiff
path: root/sound/ppc/beep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-08 17:05:38 +0300
committerTakashi Iwai <tiwai@suse.de>2021-06-09 18:30:36 +0300
commite73ad38871cb20bbe1a74306f3798828b4c40175 (patch)
tree803b6afe7aa7ca2e6f2ef0720e40a10c8a56d5c0 /sound/ppc/beep.c
parentdd1fc3c585dddf0f8d1baaa941395aa4afdfa724 (diff)
downloadlinux-e73ad38871cb20bbe1a74306f3798828b4c40175.tar.xz
ALSA: poewrmac: Fix assignment in if condition
PPC powermac driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-65-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/ppc/beep.c')
-rw-r--r--sound/ppc/beep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/ppc/beep.c b/sound/ppc/beep.c
index 6bc586a5db0f..0f4bce1c0d4f 100644
--- a/sound/ppc/beep.c
+++ b/sound/ppc/beep.c
@@ -105,7 +105,10 @@ static int snd_pmac_beep_event(struct input_dev *dev, unsigned int type,
}
chip = input_get_drvdata(dev);
- if (! chip || (beep = chip->beep) == NULL)
+ if (!chip)
+ return -1;
+ beep = chip->beep;
+ if (!beep)
return -1;
if (! hz) {