summaryrefslogtreecommitdiff
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-10 18:07:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-10 18:07:39 +0200
commitb7108486d2d60357dec274276e2f69128f29dcdc (patch)
treeff2e9cb103a94906845b40ac755fe8482f575202 /drivers/soundwire
parentd1fdb6d8f6a4109a4263176c84b899076a5f8008 (diff)
parent39194128701bf2af9bbc420ffe6e3cb5d2c16061 (diff)
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
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/intel.c4
-rw-r--r--drivers/soundwire/stream.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 31336b0271b0..60293a00a14e 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -715,8 +715,8 @@ static int intel_create_dai(struct sdw_cdns *cdns,
return -ENOMEM;
}
- dais[i].playback.channels_min = 1;
- dais[i].playback.channels_max = max_ch;
+ dais[i].capture.channels_min = 1;
+ dais[i].capture.channels_max = max_ch;
dais[i].capture.rates = SNDRV_PCM_RATE_48000;
dais[i].capture.formats = SNDRV_PCM_FMTBIT_S16_LE;
}
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index d01060dbee96..1d5294b8783b 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -814,7 +814,8 @@ static int do_bank_switch(struct sdw_stream_runtime *stream)
goto error;
}
- mutex_unlock(&bus->msg_lock);
+ if (bus->multi_link)
+ mutex_unlock(&bus->msg_lock);
}
return ret;
@@ -1406,9 +1407,7 @@ struct sdw_dpn_prop *sdw_get_slave_dpn_prop(struct sdw_slave *slave,
}
for (i = 0; i < num_ports; i++) {
- dpn_prop = &dpn_prop[i];
-
- if (dpn_prop->num == port_num)
+ if (dpn_prop[i].num == port_num)
return &dpn_prop[i];
}