diff options
Diffstat (limited to 'sound/sparc/cs4231.c')
-rw-r--r-- | sound/sparc/cs4231.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index e73c962590eb..883678ee971c 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -1146,10 +1146,8 @@ static int snd_cs4231_playback_open(struct snd_pcm_substream *substream) runtime->hw = snd_cs4231_playback; err = snd_cs4231_open(chip, CS4231_MODE_PLAY); - if (err < 0) { - snd_free_pages(runtime->dma_area, runtime->dma_bytes); + if (err < 0) return err; - } chip->playback_substream = substream; chip->p_periods_sent = 0; snd_pcm_set_sync(substream); @@ -1167,10 +1165,8 @@ static int snd_cs4231_capture_open(struct snd_pcm_substream *substream) runtime->hw = snd_cs4231_capture; err = snd_cs4231_open(chip, CS4231_MODE_RECORD); - if (err < 0) { - snd_free_pages(runtime->dma_area, runtime->dma_bytes); + if (err < 0) return err; - } chip->capture_substream = substream; chip->c_periods_sent = 0; snd_pcm_set_sync(substream); @@ -2075,12 +2071,12 @@ static int cs4231_ebus_probe(struct platform_device *op) static int cs4231_probe(struct platform_device *op) { #ifdef EBUS_SUPPORT - if (!strcmp(op->dev.of_node->parent->name, "ebus")) + if (of_node_name_eq(op->dev.of_node->parent, "ebus")) return cs4231_ebus_probe(op); #endif #ifdef SBUS_SUPPORT - if (!strcmp(op->dev.of_node->parent->name, "sbus") || - !strcmp(op->dev.of_node->parent->name, "sbi")) + if (of_node_name_eq(op->dev.of_node->parent, "sbus") || + of_node_name_eq(op->dev.of_node->parent, "sbi")) return cs4231_sbus_probe(op); #endif return -ENODEV; |