diff mbox series

HID: rmi: Simplify an error handling path in 'rmi_hid_read_block()'

Message ID 20200321064048.15768-1-christophe.jaillet@wanadoo.fr (mailing list archive)
State Mainlined
Commit 2e1b9e1edff7fe19d37f0a5993ac03c5389af809
Delegated to: Jiri Kosina
Headers show
Series HID: rmi: Simplify an error handling path in 'rmi_hid_read_block()' | expand

Commit Message

Christophe JAILLET March 21, 2020, 6:40 a.m. UTC
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(-)

Comments

Jiri Kosina March 22, 2020, 11:10 p.m. UTC | #1
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.
diff mbox series

Patch

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);