From: Bjorn Andersson Date: Thu, 10 Jun 2021 00:21:32 +0000 (-0700) Subject: usb: typec: mux: Fix copy-paste mistake in typec_mux_match X-Git-Tag: v5.4.126~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a0828219185dbfd3950e3d3d9ee6916722c140b1;p=users%2Fdwmw2%2Flinux.git usb: typec: mux: Fix copy-paste mistake in typec_mux_match commit 142d0b24c1b17139f1aaaacae7542a38aa85640f upstream. Fix the copy-paste mistake in the return path of typec_mux_match(), where dev is considered a member of struct typec_switch rather than struct typec_mux. The two structs are identical in regards to having the struct device as the first entry, so this provides no functional change. Fixes: 3370db35193b ("usb: typec: Registering real device entries for the muxes") Reviewed-by: Heikki Krogerus Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210610002132.3088083-1-bjorn.andersson@linaro.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c index 57907f26f6819..2e60cee5f82b8 100644 --- a/drivers/usb/typec/mux.c +++ b/drivers/usb/typec/mux.c @@ -243,7 +243,7 @@ find_mux: dev = class_find_device(&typec_mux_class, NULL, con->fwnode, mux_fwnode_match); - return dev ? to_typec_switch(dev) : ERR_PTR(-EPROBE_DEFER); + return dev ? to_typec_mux(dev) : ERR_PTR(-EPROBE_DEFER); } /**