Input: psxpad-spi - add a check for the return value of spi_setup()
The probe function in the psxpad-spi driver calls spi_setup() but fails to check its return value. If the SPI bus setup fails, the driver will still load successfully, resulting in potential error in later I/O operations. Add a check for the return value of spi_setup() and return an error on failure. Fixes: 8be193c7 ("Input: add support for PlayStation 1/2 joypads connected via SPI") Signed-off-by:Haotian Zhang <vulab@iscas.ac.cn> Signed-off-by:
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Loading
Please sign in to comment