[linux-dvb] [patch 2.6.12-rc4-dvb-cvs 9/14] dvb: error checking in __av7110_budget_register/av7110_register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 20, 2005 at 09:01:59PM +0200, Francois Romieu wrote:
>  static int av7110_register(struct av7110 *av7110)
>  {
> -	int ret, i;
>  	struct dvb_demux *dvbdemux = &av7110->demux;
>  	struct dmx_demux *dmx = &dvbdemux->dmx;
> +	int i, ret = -1;
>  
>  	dprintk(4, "%p\n", av7110);
>  
> +	/* FIXME: smells like race */
>  	if (av7110->registered)
> -		return -1;
> +		goto out;
>  
>  	av7110->registered = 1;

I'm not sure what av7110->registered is good for, it can probably
be removed. For now you could just add a printk or better WARN_ON so we
can see if this triggers. Or better review the code to see if we can
remove it.

Johannes



[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux