From: Lorenzo Bianconi Date: Mon, 11 Feb 2019 23:45:55 +0000 (+0100) Subject: mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx X-Git-Tag: v5.4-rc1~1543^2~131^2~58^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4bfff1ec2599d737470daa3b80711fbc2e8ccfd2;p=platform%2Fkernel%2Flinux-rpi.git mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx 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 Signed-off-by: Felix Fietkau --- diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c index c9f095c..7819196 100644 --- a/drivers/net/wireless/mediatek/mt76/usb.c +++ b/drivers/net/wireless/mediatek/mt76/usb.c @@ -492,7 +492,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;