Re: [PATCH] ALSA: caiaq: Fix control_put() result and cache rollback
From: Takashi Iwai
Date: Fri Apr 17 2026 - 11:56:37 EST
On Fri, 17 Apr 2026 15:41:33 +0200,
Cássio Gabriel wrote:
>
> control_put() always returns 1 and updates cdev->control_state[]
> before sending the USB command. It also ignores transport errors
> from usb_bulk_msg(), snd_usb_caiaq_send_command(), and
> snd_usb_caiaq_send_command_bank().
>
> That breaks the ALSA .put() contract and can leave control_get()
> reporting a cached value the device never accepted.
>
> Return 0 for unchanged values, propagate transport failures,
> and restore the cached byte when the write fails.
>
> Fixes: 8e3cd08ed8e59 ("[ALSA] caiaq - add control API and more input features")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>
Applied now. Thanks.
Takashi