diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-05 09:55:37 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-05 09:56:08 +0100 |
| commit | 85c4efbe608887cbce675fad3288172046f74713 (patch) | |
| tree | 42aa0a76ec945920d04344a6c2a7f7c86d054c28 /drivers/usb/typec/class.c | |
| parent | phy: realtek: usb: fix NULL deref in rtk_usb3phy_probe (diff) | |
| parent | Linux 6.12-rc6 (diff) | |
| download | linux-85c4efbe608887cbce675fad3288172046f74713.tar.gz linux-85c4efbe608887cbce675fad3288172046f74713.zip | |
Merge v6.12-rc6 into usb-next
We need the USB fixes in here as well, and this resolves a merge
conflict in:
drivers/usb/typec/tcpm/tcpm.c
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/r/20241101150730.090dc30f@canb.auug.org.au
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/class.c')
| -rw-r--r-- | drivers/usb/typec/class.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index bd41abceb050..4b3047e055a3 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -2483,7 +2483,7 @@ void typec_port_register_altmodes(struct typec_port *port, const struct typec_altmode_ops *ops, void *drvdata, struct typec_altmode **altmodes, size_t n) { - struct fwnode_handle *altmodes_node, *child; + struct fwnode_handle *child; struct typec_altmode_desc desc; struct typec_altmode *alt; size_t index = 0; @@ -2491,7 +2491,9 @@ void typec_port_register_altmodes(struct typec_port *port, u32 vdo; int ret; - altmodes_node = device_get_named_child_node(&port->dev, "altmodes"); + struct fwnode_handle *altmodes_node __free(fwnode_handle) = + device_get_named_child_node(&port->dev, "altmodes"); + if (!altmodes_node) return; /* No altmodes specified */ |
