> > Oh, then I would have to switch it up a bit. This should work ok right?
> > ---------------------
> > static int spd_read_byte(unsigned device, unsigned address)
> > {
> > int i;
> >
> > if (device == 0x50){
> > return do_smbus_read_byte(device, address);
> > } else if (device == 0x51){
> > for (i=0; i < (sizeof spd_table/sizeof spd_table[0]); i++){
> > if (spd_table[i].address == address){
> > return spd_table[i].data;
> > }
> > }
return 0xFF; /* This line returns 0xFF when address not found */
> > } else {
> > return 0xFF; /* returns 0xFF on any failures */
> > }
> > }
I think it's a good idea to have a return in every control path.
Myles
--
linuxbios mailing list
[email protected]
http://www.linuxbios.org/mailman/listinfo/linuxbios