aboutsummaryrefslogtreecommitdiff
path: root/sound/parisc/harmony.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/parisc/harmony.c')
-rw-r--r--sound/parisc/harmony.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c
index e924492df21..f47f9e226b0 100644
--- a/sound/parisc/harmony.c
+++ b/sound/parisc/harmony.c
@@ -624,6 +624,9 @@ snd_harmony_pcm_init(struct snd_harmony *h)
struct snd_pcm *pcm;
int err;
+ if (snd_BUG_ON(!h))
+ return -EINVAL;
+
harmony_disable_interrupts(h);
err = snd_pcm_new(h->card, "harmony", 0, 1, 1, &pcm);
@@ -865,11 +868,12 @@ snd_harmony_mixer_reset(struct snd_harmony *h)
static int __devinit
snd_harmony_mixer_init(struct snd_harmony *h)
{
- struct snd_card *card = h->card;
+ struct snd_card *card;
int idx, err;
if (snd_BUG_ON(!h))
return -EINVAL;
+ card = h->card;
strcpy(card->mixername, "Harmony Gain control interface");
for (idx = 0; idx < HARMONY_CONTROLS; idx++) {