drivers: misc: ad525x_dpot: Add missing check in dpot_read_spi
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 1 Mar 2021 12:50:57 +0000 (20:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:21:02 +0000 (09:21 +0100)
commitf8096ff38d5f62d8a2c473e1bec0163a1b2b86d8
tree1c0b9215225f6f4508496090a32b8cef821f446a
parentbc6350167ef4e003e463c25417b48a446e48001d
drivers: misc: ad525x_dpot: Add missing check in dpot_read_spi

The use of dpot_read_r8d8() after checking dpot->uid is similar.
However, we check the return value and return an error code only
in one path, which is odd.

Link: https://lore.kernel.org/r/20210301125057.28819-1-dinghao.liu@zju.edu.cn
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ad525x_dpot.c