At present this stores the error number in an unsigned int so an error is
never detected. Use the existing signed variable instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
struct eth_pdata *pdata = dev_get_platdata(dev);
struct eth_sandbox_raw_priv *priv = dev_get_priv(dev);
const char *ifname;
- u32 local;
int ret;
pdata->iobase = dev_read_addr(dev);
priv->host_ifindex, priv->host_ifname);
}
- local = sandbox_eth_raw_os_is_local(priv->host_ifname);
- if (local < 0)
- return local;
- priv->local = local;
+ ret = sandbox_eth_raw_os_is_local(priv->host_ifname);
+ if (ret < 0)
+ return ret;
+ priv->local = ret;
return 0;
}