[alsa-devel] [PATCH 1/2] ALSA: snd_usb_caiaq: give better shortname

Daniel Mack daniel at caiaq.de
Tue Jun 2 13:55:59 CEST 2009


On Tue, Jun 02, 2009 at 01:01:35PM +0200, Takashi Iwai wrote:
> > +	/* if the id was not passed as module option, fill it with a shortened
> > +	 * version of the product string which does not contain any
> > +	 * whitespaces */
> > +
> > +	if (*card->id == '\0') {
> 
> Hm, at this place, card->id should be never an empty string so
> this is always true.

Are you sure about that? The same condition is used in
snd_card_register() which is called _after_ the code in question from my
driver.

And the id should not be zero if snd_card_create() was called with an id
argument given. So the condition above should be false if the id was passed
before. Or do I miss anything?

Daniel



More information about the Alsa-devel mailing list