]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: cypress_ps2 - fix error handling when sending command fails
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 28 Jun 2024 22:47:24 +0000 (15:47 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 3 Jul 2024 20:48:53 +0000 (13:48 -0700)
commite8688b93ce00230614406d189e8286315832469a
tree412c7b71e509de396447332e92dc7bf59b7ef018
parentc1a339001191e60f70c4da827569b3bb27500a9a
Input: cypress_ps2 - fix error handling when sending command fails

Stop layering error handling in cypress_ps2_sendbyte() and simply
pass on error code from ps2_sendbyte() and use it in the callers.

This fixes mishandling of error condition in
cypress_ps2_read_cmd_status() which expects errors to be negative.

Reported-by: Igor Artemiev <Igor.A.Artemiev@mcst.ru>
Link: https://lore.kernel.org/r/20240628224728.2180126-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/cypress_ps2.c
drivers/input/mouse/cypress_ps2.h