[linux-dvb] Doubt in file dvb-usb-dvb.c

lwtbenben lwtbenben at 163.com
Fri Jul 27 12:16:30 CEST 2007


 > 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.linuxtv.org/pipermail/linux-dvb/attachments/20070727/e91a4890/attachment.htm 


More information about the linux-dvb mailing list