[linux-dvb] Doubt in file dvb-usb-dvb.c
patrick.boettcher at desy.de
Fri Jul 27 12:17:49 CEST 2007
On Fri, 27 Jul 2007, lwtbenben wrote:
> > if (adap->props.frontend_attach(adap) == 0 && adap->fe != NULL)
> When the first condition is checked, my_own_frontend_attach() function is called, using dvb_attach() macro to gain the adap->fe pointer, in my driver it is successful.
> But my driver still can not register any frontend to the Linux DVB core, it must for the second condition, So I think maybe this state is unsuitable here.
> Maybe should be something like this:
> if(adap->props.frontend_attach(adap) == 0)
> if(adap->fe != NULL)
> So what is your opinion?
> > it cannot enter this function? Why, because the compiler is checking
> > adap->fe first?
> The reason is the second condition. Maybe Gcc compiler check the second condition first.
That would be crazy.
Mail: patrick.boettcher at desy.de
More information about the linux-dvb