Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ece2e91a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: f_gps: Ratelimit the error and debug messages"

parents 30713313 39dfbfc5
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -590,7 +590,8 @@ gps_send_cpkt_response(void *gr, void *buf, size_t len)
	}
	}
	cpkt = gps_alloc_ctrl_pkt(len, GFP_ATOMIC);
	cpkt = gps_alloc_ctrl_pkt(len, GFP_ATOMIC);
	if (IS_ERR(cpkt)) {
	if (IS_ERR(cpkt)) {
		pr_err("%s: Unable to allocate ctrl pkt\n", __func__);
		pr_err_ratelimited("%s: Unable to allocate ctrl pkt\n",
					__func__);
		return -ENOMEM;
		return -ENOMEM;
	}
	}
	memcpy(cpkt->buf, buf, len);
	memcpy(cpkt->buf, buf, len);
@@ -598,7 +599,7 @@ gps_send_cpkt_response(void *gr, void *buf, size_t len)


	dev = port_to_gps(gr);
	dev = port_to_gps(gr);


	pr_debug("%s: dev:%pK\n", __func__, dev);
	pr_debug_ratelimited("%s: dev:%pK\n", __func__, dev);


	if (!atomic_read(&dev->online) || !atomic_read(&dev->ctrl_online)) {
	if (!atomic_read(&dev->online) || !atomic_read(&dev->ctrl_online)) {
		gps_free_ctrl_pkt(cpkt);
		gps_free_ctrl_pkt(cpkt);