diff mbox series

mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx

Message ID 25bdd32592a9e0e64d202b1a53c4680f0d958423.1549928358.git.lorenzo@kernel.org (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show
Series mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx | expand

Commit Message

Lorenzo Bianconi Feb. 11, 2019, 11:45 p.m. UTC
From: Lorenzo Bianconi <lorenzo@kernel.org>

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

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/usb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Felix Fietkau Feb. 18, 2019, 7:03 p.m. UTC | #1
On 2019-02-12 00:45, lorenzo@kernel.org wrote:
> From: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> During device removal the driver can report multiple error messages.
> Use dev_err_ratelimited instead of dev_err to display urb errors
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Applied, thanks.

- Felix
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index 018a8cf0941e..10cd98d11fc2 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -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;