All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Henrik Rydberg <rydberg@bitmath.org>,
	James Hilliard <james.hilliard1@gmail.com>,
	Daniel Ritz <daniel.ritz@gmx.ch>,
	linux-input@vger.kernel.org
Subject: [PATCH 3/5] input: touchscreen: usbtouchscreen: Actually check return value of usb_submit_urb()
Date: Thu, 14 Jan 2021 15:23:21 +0000	[thread overview]
Message-ID: <20210114152323.2382283-4-lee.jones@linaro.org> (raw)
In-Reply-To: <20210114152323.2382283-1-lee.jones@linaro.org>

Fixes the following W=1 kernel build warning(s):

 drivers/input/touchscreen/usbtouchscreen.c: In function ‘nexio_read_data’:
 drivers/input/touchscreen/usbtouchscreen.c:1052:50: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>
Cc: James Hilliard <james.hilliard1@gmail.com>
Cc: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/input/touchscreen/usbtouchscreen.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 397cb1d3f481b..44a5454d04533 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -1044,6 +1044,7 @@ static void nexio_exit(struct usbtouch_usb *usbtouch)
 
 static int nexio_read_data(struct usbtouch_usb *usbtouch, unsigned char *pkt)
 {
+	struct device *dev = &usbtouch->interface->dev;
 	struct nexio_touch_packet *packet = (void *) pkt;
 	struct nexio_priv *priv = usbtouch->priv;
 	unsigned int data_len = be16_to_cpu(packet->data_len);
@@ -1062,6 +1063,8 @@ static int nexio_read_data(struct usbtouch_usb *usbtouch, unsigned char *pkt)
 
 	/* send ACK */
 	ret = usb_submit_urb(priv->ack, GFP_ATOMIC);
+	if (ret)
+		dev_warn(dev, "Failed to submit USB Request Block\n");
 
 	if (!usbtouch->type->max_xc) {
 		usbtouch->type->max_xc = 2 * x_len;
-- 
2.25.1


  parent reply	other threads:[~2021-01-14 15:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 15:23 [PATCH v3 0/5] (Set 2/2) Rid W=1 issues from Input Lee Jones
2021-01-14 15:23 ` Lee Jones
2021-01-14 15:23 ` [PATCH 1/5] input: mouse: synaptics: Replace NOOP with suitable commentary Lee Jones
2021-01-14 15:23 ` [PATCH 2/5] input: touchscreen: melfas_mip4: Mark a bunch of variables as __always_unused Lee Jones
2021-01-20  2:18   ` Dmitry Torokhov
2021-01-14 15:23 ` Lee Jones [this message]
2021-01-20  2:21   ` [PATCH 3/5] input: touchscreen: usbtouchscreen: Actually check return value of usb_submit_urb() Dmitry Torokhov
2021-01-14 15:23 ` [PATCH 4/5] input: touchscreen: surface3_spi: Remove set but unused variable 'timestamp' Lee Jones
2021-01-14 16:04   ` Benjamin Tissoires
2021-01-20  2:23   ` Dmitry Torokhov
2021-01-14 15:23 ` [PATCH 5/5] input: touchscreen: stmpe-ts: Add description for 'prop' struct member Lee Jones
2021-01-14 15:23   ` Lee Jones
2021-01-20  2:23   ` Dmitry Torokhov
2021-01-20  2:23     ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210114152323.2382283-4-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=daniel.ritz@gmx.ch \
    --cc=dmitry.torokhov@gmail.com \
    --cc=james.hilliard1@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@bitmath.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.