soundwire fixes for v5.8

This contains two fixes to sdw core for dangling pointer and a typo for
 INTSTAT register
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAl9SB/oACgkQfBQHDyUj
 g0eayQ/8CpONQvFhkS0rzKSEmn1D8Hi/RBV687nCU5ZsIA/UEjArbS4Rb88gdrFk
 709oauyEw4XuYMqFXlEsEQ5ELbMuCi7LAEn57qrN8tZ5lsl5biw6A0iRAI2XJsdu
 BIwBL9HSicbf671NUShlKcfMN+IiHOePiEwmMo94vWEeTOC5cWd9R64QYZsrmk1h
 cHXtefXrKDcrX6nNwKZth9Q/r2ZAQfQLOMe85UzrwyRLLKMQCImAw6xcmYsjVGgR
 xTRtFcUtWYnB3jROtZ0l+l4kqHtFIxg98Jc/8vgc1dbasCa7xbBWQVrj1UW6N14r
 aTH2rFacJBNQ1NqIaNRtSU7h6XTYy6PBo9+LoUuIae4y5/d+sPSpsNAQVxYhz/qF
 wyWtkeO5rdiSePHnT4og0j2hOxHZt7+p3Xu8OH/1i7v1qNnsU/Fg2vX5mQs44BT7
 ixHy64Mvk3jHvZr2+QBwwn/mCoGwtEFAuj6RUw8NtXoeTRUo9BkkE0RwyFs7eFgS
 xQf00cvhuUsW4o9/D/G2hFain2TSV1SJX4MI1tHkSURoKod3PGMEDiTENWAFdut+
 i9qQhij5z6kfJUHcLq3Tont0NnN+twC0KCv15FQGIMhpwlfmzdegDtaYckXr+I+i
 +7JSx0NILy1NHBEWgWnCnMxEWvIpb0hYG9ZucaeUQfK1MxjoZVw=
 =JZwY
 -----END PGP SIGNATURE-----

Merge tag 'soundwire-5.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-linus

Vinod writes:

soundwire fixes for v5.8

This contains two fixes to sdw core for dangling pointer and a typo for
INTSTAT register

* tag 'soundwire-5.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: fix double free of dangling pointer
  soundwire: bus: fix typo in comment on INTSTAT registers
This commit is contained in:
Greg Kroah-Hartman 2020-09-04 12:41:08 +02:00
commit 51fc07d9ff
2 changed files with 6 additions and 4 deletions

View File

@ -1372,7 +1372,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
return ret;
}
/* Read Instat 1, Instat 2 and Instat 3 registers */
/* Read Intstat 1, Intstat 2 and Intstat 3 registers */
ret = sdw_read(slave, SDW_SCP_INT1);
if (ret < 0) {
dev_err(slave->bus->dev,

View File

@ -717,6 +717,7 @@ static int sdw_bank_switch(struct sdw_bus *bus, int m_rt_count)
kfree(wbuf);
error_1:
kfree(wr_msg);
bus->defer_msg.msg = NULL;
return ret;
}
@ -840,9 +841,10 @@ static int do_bank_switch(struct sdw_stream_runtime *stream)
error:
list_for_each_entry(m_rt, &stream->master_list, stream_node) {
bus = m_rt->bus;
kfree(bus->defer_msg.msg->buf);
kfree(bus->defer_msg.msg);
if (bus->defer_msg.msg) {
kfree(bus->defer_msg.msg->buf);
kfree(bus->defer_msg.msg);
}
}
msg_unlock: