X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fppc%2Fpmac.c;h=aa57170101fd44dd2a090b0acd2c302bbe00e3e8;hb=b2c2844c5a486020e5d564870d114a7f4cd5ea4f;hp=4988f873a7bacc6bd1749bea5f1d137823401da1;hpb=b2faf597d93bdf5e2d12d93ea0815935a73f749e;p=linux-2.6-omap-h63xx.git diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 4988f873a7b..aa57170101f 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -66,7 +66,7 @@ static int snd_pmac_dbdma_alloc(struct snd_pmac *chip, struct pmac_dbdma *rec, i static void snd_pmac_dbdma_free(struct snd_pmac *chip, struct pmac_dbdma *rec) { - if (rec) { + if (rec->space) { unsigned int rsize = sizeof(struct dbdma_cmd) * (rec->size + 1); dma_free_coherent(&chip->pdev->dev, rsize, rec->space, rec->dma_base); @@ -881,6 +881,7 @@ static int __init snd_pmac_detect(struct snd_pmac *chip) chip->can_capture = 1; chip->num_freqs = ARRAY_SIZE(awacs_freqs); chip->freq_table = awacs_freqs; + chip->pdev = NULL; chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */