Commit 492bbe7f authored by Grant Grundler's avatar Grant Grundler Committed by David S. Miller

net: usb: cdc_ncm: emit dev_err on error paths

Several error paths in bind/probe code will only emit
output using dev_dbg. But if we are going to fail the
bind/probe, emit related output with "err" priority.
Signed-off-by: default avatarGrant Grundler <grundler@chromium.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a4813dc7
...@@ -851,17 +851,17 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ ...@@ -851,17 +851,17 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
/* check if we got everything */ /* check if we got everything */
if (!ctx->data) { if (!ctx->data) {
dev_dbg(&intf->dev, "CDC Union missing and no IAD found\n"); dev_err(&intf->dev, "CDC Union missing and no IAD found\n");
goto error; goto error;
} }
if (cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting)) { if (cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting)) {
if (!ctx->mbim_desc) { if (!ctx->mbim_desc) {
dev_dbg(&intf->dev, "MBIM functional descriptor missing\n"); dev_err(&intf->dev, "MBIM functional descriptor missing\n");
goto error; goto error;
} }
} else { } else {
if (!ctx->ether_desc || !ctx->func_desc) { if (!ctx->ether_desc || !ctx->func_desc) {
dev_dbg(&intf->dev, "NCM or ECM functional descriptors missing\n"); dev_err(&intf->dev, "NCM or ECM functional descriptors missing\n");
goto error; goto error;
} }
} }
...@@ -870,7 +870,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ ...@@ -870,7 +870,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
if (ctx->data != ctx->control) { if (ctx->data != ctx->control) {
temp = usb_driver_claim_interface(driver, ctx->data, dev); temp = usb_driver_claim_interface(driver, ctx->data, dev);
if (temp) { if (temp) {
dev_dbg(&intf->dev, "failed to claim data intf\n"); dev_err(&intf->dev, "failed to claim data intf\n");
goto error; goto error;
} }
} }
...@@ -926,7 +926,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ ...@@ -926,7 +926,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
if (ctx->ether_desc) { if (ctx->ether_desc) {
temp = usbnet_get_ethernet_addr(dev, ctx->ether_desc->iMACAddress); temp = usbnet_get_ethernet_addr(dev, ctx->ether_desc->iMACAddress);
if (temp) { if (temp) {
dev_dbg(&intf->dev, "failed to get mac address\n"); dev_err(&intf->dev, "failed to get mac address\n");
goto error2; goto error2;
} }
dev_info(&intf->dev, "MAC-Address: %pM\n", dev->net->dev_addr); dev_info(&intf->dev, "MAC-Address: %pM\n", dev->net->dev_addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment