On 06/30/2011 04:02 PM, Luca Ceresoli wrote: > +static int smc911x_miiphy_read_byname(char *devname, unsigned char addr, > + unsigned char reg, unsigned short *value) > +{ > + struct eth_device *dev; > + > + if (devname == NULL) > + return -1; > + > + dev = eth_get_dev_by_name(devname); You're right. eth_get_dev_by_name() is not safe for devname == NULL as it uses strcmp(). Best would be to fix this there, I'll adjust my patch accordingly.
> + > + if (dev == NULL) { > + printf(DRIVERNAME ": device %s not found\n", devname); > + return -1; > + } None of the other drivers in drivers/net add this kind of verbosity, so I tend to leave it at that. Helmut -- Scanned by MailScanner. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot