Commit 2ba4746b authored by Kent Gibson's avatar Kent Gibson Committed by Bartosz Golaszewski
Browse files

gpiolib: cdev: Cleanup kfifo_out() error handling



The handling of kfifo_out() errors in read functions obscures any error.
The error condition should never occur but, while a ret is set to -EIO, it
is subsequently ignored and the read functions instead return the number
of bytes copied to that point, potentially masking the fact that any error
occurred.

Log a warning and return -EIO in the case of a kfifo_out() error to make
it clear something very odd is going on here.

Signed-off-by: default avatarKent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20240529131953.195777-4-warthog618@gmail.com


Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 4ce5ca65
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment