staging: kpc2000: kpc_dma: set error code in probe
authorEvgeny Novikov <novikov@ispras.ru>
Tue, 23 Jun 2020 08:29:59 +0000 (11:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jun 2020 13:40:27 +0000 (15:40 +0200)
commit8ce8668bfb64f2973cc1276c54619aceede6498a
treebf503b09ee4d87dbaa3ad7b2e48267186377f91c
parentc8a00029dc70d0c35e84d6f0ff99a534dfe636e6
staging: kpc2000: kpc_dma: set error code in probe

If device_create() fails during probing the device, kpc_dma_probe() does
not set the error code and returns 0. This can result in various bad
issues later. The patch sets the error code on the corresponding error
handling path.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Link: https://lore.kernel.org/r/20200623082959.14951-1-novikov@ispras.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c