Skip to contentSkip to conversation

mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx

PATCH Applied [email protected] 2 participants 2 messages Feb 11, 2019 – Feb 18, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

[email protected]

author maintainer
#1 lore raw

PATCH 1/1 mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx

From: Lorenzo Bianconi <[email protected]>

During device removal the driver can report multiple error messages. Use dev_err_ratelimited instead of dev_err to display urb errors

---
 drivers/net/wireless/mediatek/mt76/usb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/usb.c +2 -1
index 018a8cf0941e..10cd98d11fc2 100644
@@ -446,7 +446,8 @@ static void mt76u_complete_rx(struct urb *urb)
 	case -ENOENT:
 		return;
 	default:
-		dev_err(dev->dev, "rx urb failed: %d\n", urb->status);
+		dev_err_ratelimited(dev->dev, "rx urb failed: %d\n",
+				    urb->status);
 		/* fall through */
 	case 0:
 		break;
Signature · 1 line
2.20.1