mirror of https://github.com/torvalds/linux.git
net: usb: usbnet: adhere to style
This satisfies the coding style. Signed-off-by: Oliver Neukum <oneukum@suse.com> Link: https://patch.msgid.link/20251112102610.281565-1-oneukum@suse.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
c294432be1
commit
de9c41624c
|
|
@ -163,7 +163,7 @@ int usbnet_get_ethernet_addr(struct usbnet *dev, int iMACAddress)
|
|||
int tmp = -1, ret;
|
||||
unsigned char buf [13];
|
||||
|
||||
ret = usb_string(dev->udev, iMACAddress, buf, sizeof buf);
|
||||
ret = usb_string(dev->udev, iMACAddress, buf, sizeof(buf));
|
||||
if (ret == 12)
|
||||
tmp = hex2bin(addr, buf, 6);
|
||||
if (tmp < 0) {
|
||||
|
|
@ -910,7 +910,9 @@ int usbnet_open(struct net_device *net)
|
|||
}
|
||||
|
||||
// put into "known safe" state
|
||||
if (info->reset && (retval = info->reset (dev)) < 0) {
|
||||
if (info->reset) {
|
||||
retval = info->reset(dev);
|
||||
if (retval < 0) {
|
||||
netif_info(dev, ifup, dev->net,
|
||||
"open reset fail (%d) usbnet usb-%s-%s, %s\n",
|
||||
retval,
|
||||
|
|
@ -919,15 +921,19 @@ int usbnet_open(struct net_device *net)
|
|||
info->description);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* hard_mtu or rx_urb_size may change in reset() */
|
||||
usbnet_update_max_qlen(dev);
|
||||
|
||||
// insist peer be connected
|
||||
if (info->check_connect && (retval = info->check_connect (dev)) < 0) {
|
||||
if (info->check_connect) {
|
||||
retval = info->check_connect(dev);
|
||||
if (retval < 0) {
|
||||
netif_err(dev, ifup, dev->net, "can't open; %d\n", retval);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* start any status interrupt transfer */
|
||||
if (dev->interrupt) {
|
||||
|
|
@ -1085,7 +1091,7 @@ void usbnet_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info)
|
|||
strscpy(info->driver, dev->driver_name, sizeof(info->driver));
|
||||
strscpy(info->fw_version, dev->driver_info->description,
|
||||
sizeof(info->fw_version));
|
||||
usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info);
|
||||
usb_make_path(dev->udev, info->bus_info, sizeof(info->bus_info));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usbnet_get_drvinfo);
|
||||
|
||||
|
|
@ -1410,7 +1416,8 @@ netdev_tx_t usbnet_start_xmit(struct sk_buff *skb, struct net_device *net)
|
|||
}
|
||||
}
|
||||
|
||||
if (!(urb = usb_alloc_urb (0, GFP_ATOMIC))) {
|
||||
urb = usb_alloc_urb(0, GFP_ATOMIC);
|
||||
if (!urb) {
|
||||
netif_dbg(dev, tx_err, dev->net, "no urb\n");
|
||||
goto drop;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue