fixup! Simplify Synaptics driver

Remove "for (;;)" loop that never looped

It would either return or break at the end, so just remove the loop, it
is not needed.
This commit is contained in:
Benjamin Berg 2019-06-12 13:39:56 +02:00
parent e4bac112aa
commit 477df2a861

View file

@ -225,8 +225,7 @@ int bmkt_sensor_send_message(bmkt_sensor_t *sensor, uint8_t msg_id, uint8_t payl
bmkt_dbg_log("session_ctx->seq_num=%d, sensor->seq_num=%d", session_ctx->seq_num, sensor->seq_num);
bmkt_op_set_state(sensor, BMKT_OP_STATE_START);
for (;;)
{
ret = usb_get_command_buffer(&sensor->usb_xport, &cmd, &cmd_buf_len);
if (ret != BMKT_SUCCESS)
{
@ -256,8 +255,6 @@ int bmkt_sensor_send_message(bmkt_sensor_t *sensor, uint8_t msg_id, uint8_t payl
bmkt_dbg_log("%s: failed to send ACE command: %d", __func__, ret);
goto cleanup;
}
break;
}
cleanup:
usb_release_command_buffer(&sensor->usb_xport);