Linux Input Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] HID: rmi: Simplify an error handling path in 'rmi_hid_read_block()'
@ 2020-03-21  6:40 Christophe JAILLET
  2020-03-22 23:10 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2020-03-21  6:40 UTC (permalink / raw)
  To: jikos, benjamin.tissoires
  Cc: linux-input, linux-kernel, kernel-janitors, Christophe JAILLET

The 'RMI_READ_REQUEST_PENDING' bit is already cleared in the error handling
path. There is no need to reset it twice.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/hid/hid-rmi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
index 9ce22acdfaca..8cffa84c9650 100644
--- a/drivers/hid/hid-rmi.c
+++ b/drivers/hid/hid-rmi.c
@@ -217,7 +217,6 @@ static int rmi_hid_read_block(struct rmi_transport_dev *xport, u16 addr,
 		ret = rmi_write_report(hdev, data->writeReport,
 						data->output_report_size);
 		if (ret != data->output_report_size) {
-			clear_bit(RMI_READ_REQUEST_PENDING, &data->flags);
 			dev_err(&hdev->dev,
 				"failed to write request output report (%d)\n",
 				ret);
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] HID: rmi: Simplify an error handling path in 'rmi_hid_read_block()'
  2020-03-21  6:40 [PATCH] HID: rmi: Simplify an error handling path in 'rmi_hid_read_block()' Christophe JAILLET
@ 2020-03-22 23:10 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2020-03-22 23:10 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: benjamin.tissoires, linux-input, linux-kernel, kernel-janitors

On Sat, 21 Mar 2020, Christophe JAILLET wrote:

> The 'RMI_READ_REQUEST_PENDING' bit is already cleared in the error 
> handling path. There is no need to reset it twice.

Good catch. Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-21  6:40 [PATCH] HID: rmi: Simplify an error handling path in 'rmi_hid_read_block()' Christophe JAILLET
2020-03-22 23:10 ` Jiri Kosina

Linux Input Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-input/0 linux-input/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-input linux-input/ https://lore.kernel.org/linux-input \
		linux-input@vger.kernel.org
	public-inbox-index linux-input

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-input


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git