Commit bc2f3e4c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'thunderbolt-for-v5.12-rc7' of...

Merge tag 'thunderbolt-for-v5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus

Mika writes:

thunderbolt: Fixes for v5.12-rc7

This includes two fixes:

  - Fix memory leak in tb_retimer_add()
  - Off by one in tb_port_find_retimer()

Both have been in linux-next without reported issues.

* tag 'thunderbolt-for-v5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt:
  thunderbolt: Fix off by one in tb_port_find_retimer()
  thunderbolt: Fix a leak in tb_retimer_add()
parents 363eaa3a 08fe7ae1
...@@ -347,7 +347,7 @@ static int tb_retimer_add(struct tb_port *port, u8 index, u32 auth_status) ...@@ -347,7 +347,7 @@ static int tb_retimer_add(struct tb_port *port, u8 index, u32 auth_status)
ret = tb_retimer_nvm_add(rt); ret = tb_retimer_nvm_add(rt);
if (ret) { if (ret) {
dev_err(&rt->dev, "failed to add NVM devices: %d\n", ret); dev_err(&rt->dev, "failed to add NVM devices: %d\n", ret);
device_del(&rt->dev); device_unregister(&rt->dev);
return ret; return ret;
} }
...@@ -406,7 +406,7 @@ static struct tb_retimer *tb_port_find_retimer(struct tb_port *port, u8 index) ...@@ -406,7 +406,7 @@ static struct tb_retimer *tb_port_find_retimer(struct tb_port *port, u8 index)
*/ */
int tb_retimer_scan(struct tb_port *port) int tb_retimer_scan(struct tb_port *port)
{ {
u32 status[TB_MAX_RETIMER_INDEX] = {}; u32 status[TB_MAX_RETIMER_INDEX + 1] = {};
int ret, i, last_idx = 0; int ret, i, last_idx = 0;
if (!port->cap_usb4) if (!port->cap_usb4)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment