Re: [PATCH] usb: typec: mux: Fix typec_switch_match()

Jens Glathe <[email protected]>
Newsgroups org.kernel.vger.linux-usb,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
Hi Marek,

On 8/18/26 18:56, Marek Vasut wrote:
> Hello Sebastian,
[...]
> Could you revert f576c75f95a5 ("Revert "usb: typec: mux: avoid 
> duplicated mux switches"") and apply the following patch (equivalent 
> to this patch, applies to mux instead of switch) and see if that fixes 
> the T14s for you too then ? If yes, than, I think this might be the 
> proper fix rather than the revert:
>
> diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
> index 4a4297f15aad3..afa6fc1813978 100644
> --- a/drivers/usb/typec/mux.c
> +++ b/drivers/usb/typec/mux.c
> @@ -294,6 +294,8 @@ static void *typec_mux_match(const struct 
> fwnode_handle *fwnode,
>
>         dev = class_find_device(&typec_mux_class, NULL, fwnode,
>                                 mux_fwnode_match);
> +       if (!dev)
> +               return ERR_PTR(-EPROBE_DEFER);
>
>         /* Skip duplicates */
>         for (i = 0; i < TYPEC_MUX_MAX_DEVS; i++)
> @@ -303,7 +305,7 @@ static void *typec_mux_match(const struct 
> fwnode_handle *fwnode,
>                 }
>
>
> -       return dev ? to_typec_mux_dev(dev) : ERR_PTR(-EPROBE_DEFER);
> +       return to_typec_mux_dev(dev);
>  }
>
>  /**

I will test that one with the f576c75f95a5 reverted on the x1p and 
sc8280xp boxes I have here, let's see. T14s G6 shouldn't be affected 
either way.

with best regards

Jens
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.