Commit e85e2fa85ec09a6fac2846d1d881d8737e2bbda9

Authored by Stefan Roese
1 parent 491fb6dea9

net: Print error message upon net usage when no ethernet-interface is found

This patch fixes a problem seen on PPC4xx boards, when no MAC address is
defined. Then no ethernet interface is available but a simple "tftp"
command will return without any error message which is quite confusing.

Signed-off-by: Stefan Roese <sr@denx.de>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -441,8 +441,10 @@
441 441 {
442 442 struct eth_device* old_current;
443 443  
444   - if (!eth_current)
  444 + if (!eth_current) {
  445 + puts ("No ethernet found.\n");
445 446 return -1;
  447 + }
446 448  
447 449 old_current = eth_current;
448 450 do {