Skip to content

Commit b710848

Browse files
committed
Merge tag 'soundwire-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-linus
Vinod writes: soundwire fixes for v5.2-rc4 Srinivas Kandagatla fixed by bunch of issues, two in core for locking and out of bound access and one in intel driver copy-paste * tag 'soundwire-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: intel: set dai min and max channels correctly soundwire: stream: fix bad unlock balance soundwire: stream: fix out of boundary access on port properties
2 parents d1fdb6d + 3919412 commit b710848

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎drivers/soundwire/intel.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,8 @@ static int intel_create_dai(struct sdw_cdns *cdns,
715715
return -ENOMEM;
716716
}
717717

718-
dais[i].playback.channels_min = 1;
719-
dais[i].playback.channels_max = max_ch;
718+
dais[i].capture.channels_min = 1;
719+
dais[i].capture.channels_max = max_ch;
720720
dais[i].capture.rates = SNDRV_PCM_RATE_48000;
721721
dais[i].capture.formats = SNDRV_PCM_FMTBIT_S16_LE;
722722
}

‎drivers/soundwire/stream.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,8 @@ static int do_bank_switch(struct sdw_stream_runtime *stream)
814814
goto error;
815815
}
816816

817-
mutex_unlock(&bus->msg_lock);
817+
if (bus->multi_link)
818+
mutex_unlock(&bus->msg_lock);
818819
}
819820

820821
return ret;
@@ -1406,9 +1407,7 @@ struct sdw_dpn_prop *sdw_get_slave_dpn_prop(struct sdw_slave *slave,
14061407
}
14071408

14081409
for (i = 0; i < num_ports; i++) {
1409-
dpn_prop = &dpn_prop[i];
1410-
1411-
if (dpn_prop->num == port_num)
1410+
if (dpn_prop[i].num == port_num)
14121411
return &dpn_prop[i];
14131412
}
14141413

0 commit comments

Comments
 (0)