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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -347,7 +347,7 @@ static int tb_retimer_add(struct tb_port *port, u8 index, u32 auth_status)
	ret = tb_retimer_nvm_add(rt);
	if (ret) {
		dev_err(&rt->dev, "failed to add NVM devices: %d\n", ret);
		device_del(&rt->dev);
		device_unregister(&rt->dev);
		return ret;
	}

@@ -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)
{
	u32 status[TB_MAX_RETIMER_INDEX] = {};
	u32 status[TB_MAX_RETIMER_INDEX + 1] = {};
	int ret, i, last_idx = 0;

	if (!port->cap_usb4)