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

platform/chrome: cros_ec_typec: Cleanup switch handle return paths

Some of the return paths for the cros_typec_get_switch_handles()
aren't necessary. Clean up the return paths to only undo the handle
get's which succeeded.

Signed-off-by: Prashant Malani <pmalani@chromium.org>
Link: https://lore.kernel.org/r/20220711072333.2064341-9-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Prashant Malani and committed by
Greg Kroah-Hartman
66fe238a f5434e30

+2 -4
+2 -4
drivers/platform/chrome/cros_ec_typec.c
··· 157 157 return 0; 158 158 159 159 role_sw_err: 160 - usb_role_switch_put(port->role_sw); 161 - ori_sw_err: 162 160 typec_switch_put(port->ori_sw); 163 - mux_err: 161 + ori_sw_err: 164 162 typec_mux_put(port->mux); 165 - 163 + mux_err: 166 164 return -ENODEV; 167 165 } 168 166