Skip to content

Commit 492bbe7

Browse files
grundlerchromiumdavem330
authored andcommitted
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: Grant Grundler <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a4813dc commit 492bbe7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/net/usb/cdc_ncm.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -851,17 +851,17 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
851851

852852
/* check if we got everything */
853853
if (!ctx->data) {
854-
dev_dbg(&intf->dev, "CDC Union missing and no IAD found\n");
854+
dev_err(&intf->dev, "CDC Union missing and no IAD found\n");
855855
goto error;
856856
}
857857
if (cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting)) {
858858
if (!ctx->mbim_desc) {
859-
dev_dbg(&intf->dev, "MBIM functional descriptor missing\n");
859+
dev_err(&intf->dev, "MBIM functional descriptor missing\n");
860860
goto error;
861861
}
862862
} else {
863863
if (!ctx->ether_desc || !ctx->func_desc) {
864-
dev_dbg(&intf->dev, "NCM or ECM functional descriptors missing\n");
864+
dev_err(&intf->dev, "NCM or ECM functional descriptors missing\n");
865865
goto error;
866866
}
867867
}
@@ -870,7 +870,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
870870
if (ctx->data != ctx->control) {
871871
temp = usb_driver_claim_interface(driver, ctx->data, dev);
872872
if (temp) {
873-
dev_dbg(&intf->dev, "failed to claim data intf\n");
873+
dev_err(&intf->dev, "failed to claim data intf\n");
874874
goto error;
875875
}
876876
}
@@ -926,7 +926,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
926926
if (ctx->ether_desc) {
927927
temp = usbnet_get_ethernet_addr(dev, ctx->ether_desc->iMACAddress);
928928
if (temp) {
929-
dev_dbg(&intf->dev, "failed to get mac address\n");
929+
dev_err(&intf->dev, "failed to get mac address\n");
930930
goto error2;
931931
}
932932
dev_info(&intf->dev, "MAC-Address: %pM\n", dev->net->dev_addr);

0 commit comments

Comments
 (0)