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
Signed-off-by: Lorenzo Bianconi <[email protected]>
---
drivers/net/wireless/mediatek/mt76/usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
--
2.20.1
On 2019-02-12 00:45, [email protected] wrote:
> 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
>
> Signed-off-by: Lorenzo Bianconi <[email protected]>
Applied, thanks.
- Felix