Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: Fix return value in extcon-class.c

Return the value obtained from the function extcon_register_interest
instead of -ENODEV.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>

authored by

Sachin Kamat and committed by
MyungJoo Ham
c0c078c3 d851718f

+1 -1
+1 -1
drivers/extcon/extcon-class.c
··· 472 472 473 473 obj->cable_index = extcon_find_cable_index(obj->edev, cable_name); 474 474 if (obj->cable_index < 0) 475 - return -ENODEV; 475 + return obj->cable_index; 476 476 477 477 obj->user_nb = nb; 478 478