HID: rmi: Simplify an error handling path in 'rmi_hid_read_block()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 21 Mar 2020 06:40:48 +0000 (07:40 +0100)
committerJiri Kosina <jkosina@suse.cz>
Sun, 22 Mar 2020 23:08:51 +0000 (00:08 +0100)
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>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-rmi.c

index 9ce22ac..8cffa84 100644 (file)
@@ -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);