RE: [PATCH Resend 2/8] ASoC: simple-card: fix__asoc_simple_card_dai_init

From: Li.Xiubo@xxxxxxxxxxxxx
Date: Thu Jan 23 2014 - 02:23:00 EST



> > diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-
> card.c
> > index 6443c87..3b8c9a2 100644
> > --- a/sound/soc/generic/simple-card.c
> > +++ b/sound/soc/generic/simple-card.c
> > @@ -31,16 +31,21 @@ static int __asoc_simple_card_dai_init(struct
> snd_soc_dai *dai,
> >
> > daifmt |= set->fmt;
> >
> > - if (daifmt)
> > + if (daifmt) {
> > ret = snd_soc_dai_set_fmt(dai, daifmt);
> > -
> > - if (ret == -ENOTSUPP) {
> > - dev_dbg(dai->dev, "ASoC: set_fmt is not supported\n");
> > - ret = 0;
> > + if (ret && ret != -ENOTSUPP) {
> > + dev_err(dai->dev, "simple-card: set_fmt error\n");
> > + return ret;
> > + }
> > }
> >
> > - if (!ret && set->sysclk)
> > + if (set->sysclk) {
> > ret = snd_soc_dai_set_sysclk(dai, 0, set->sysclk, 0);
> > + if (ret && ret != -ENOTSUPP) {
> > + dev_err(dai->dev, "simple-card: set_sysclk error\n");
> > + return ret;
> > + }
> > + }
> >
> > return ret;
>
> Sorry: you must return 0 here
>

Yes, the ret maybe -ENOTSUPP.

I will revise it.

Thanks,

Best Regards,
Xiubo

èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—