Re: [PATCH 1/1] atmel-ssc: fix misuse of dev_dbg when requested sscinstance is not found

From: Hans-Christian Egtvedt
Date: Fri Jan 30 2009 - 04:51:55 EST


On Fri, 30 Jan 2009 01:36:28 -0800
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Fri, 30 Jan 2009 10:26:54 +0100 Haavard Skinnemoen
> <haavard.skinnemoen@xxxxxxxxx> wrote:
>
> > [CCs added]
> >
> > Hans-Christian Egtvedt wrote:
> > > This patch replaces the dev_dbg(...) with a pr_err since the ssc
> > > pointer is not valid when the id is not found in the list.
> > >
> > > Signed-off-by: Hans-Christian Egtvedt
> > > <hans-christian.egtvedt@xxxxxxxxx>
> >
> > Acked-by: Haavard Skinnemoen <haavard.skinnemoen@xxxxxxxxx>
> >
> > ...or should I just apply it to the avr32 tree?
> >
>
> Is OK, I tossed into onto my 2.6.29 pile.
>
> Should it be backported to 2.6.28.x or earlier?
>

It shoud apply clean to 2.6.28.x as well, but this bug will only
trigger when a user of the SSC peripheral tries to request a SSC which
is already requested or not added to the list at all. So in most cases
bad platform drivers setup, configuration error or bad code.

In kernel 2.6.29-rc3 there are three users:

1 sound/soc/atmel/sam9g20_wm8731.c 274 ssc = ssc_request(0);
2 sound/soc/atmel/playpaq_wm8510.c 399 ssc = ssc_request(0);
3 sound/spi/at73c213.c 980 chip->ssc = ssc_request(board->ssc_id);

The two first are a bit suspicious since they hard code id 0.

My 0.02 â is to get it in for 2.6.29, but fine to leave out for earlier
kernels.

--
Best regards,
Hans-Christian Egtvedt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/