Loading
usb: typec: tcpm/tcpci_maxim: fix error code in max_contaminant_read_resistance_kohm()
stable inclusion from stable-v6.6.72 commit 88cdfe9f15d5afc1856f4bdcc52c0e647b189133 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBQN9L Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=88cdfe9f15d5afc1856f4bdcc52c0e647b189133 -------------------------------- commit b9711ff7cde0cfbcdd44cb1fac55b6eec496e690 upstream. If max_contaminant_read_adc_mv() fails, then return the error code. Don't return zero. Fixes: 02b332a0 ("usb: typec: maxim_contaminant: Implement check_contaminant callback") Cc: stable <stable@kernel.org> Signed-off-by:Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by:
André Draszik <andre.draszik@linaro.org> Reviewed-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/f1bf3768-419e-40dd-989c-f7f455d6c824@stanley.mountain Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Wen Zhiwei <wenzhiwei@kylinos.cn>