aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/ppc/beep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/ppc/beep.c')
-rw-r--r--sound/ppc/beep.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/ppc/beep.c b/sound/ppc/beep.c
index 6bc586a5db0f..bf289783eafd 100644
--- a/sound/ppc/beep.c
+++ b/sound/ppc/beep.c
@@ -99,13 +99,16 @@ static int snd_pmac_beep_event(struct input_dev *dev, unsigned int type,
return -1;
switch (code) {
- case SND_BELL: if (hz) hz = 1000;
+ case SND_BELL: if (hz) hz = 1000; break;
case SND_TONE: break;
default: return -1;
}
chip = input_get_drvdata(dev);
- if (! chip || (beep = chip->beep) == NULL)
+ if (!chip)
+ return -1;
+ beep = chip->beep;
+ if (!beep)
return -1;
if (! hz) {