aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-trace.h
diff options
context:
space:
mode:
authorPierre-Louis Bossart <[email protected]>2020-09-21 14:08:10 +0300
committerMark Brown <[email protected]>2020-09-21 23:14:45 +0100
commit3331bcd6a2f2dbe9c1fa764df695422c99e2f1fb (patch)
treeea69ff65806bb266b142fd6f1aeab0cd745dbccc /drivers/usb/cdns3/cdns3-trace.h
parent97ee967e6c56db6eb5ed5951276b9a6db04c6489 (diff)
ASoC: SOF: control: fix size checks for ext_bytes control .get()
cppcheck complains twice: sound/soc/sof/control.c:436:2: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] size -= sizeof(const struct snd_ctl_tlv); ^ sound/soc/sof/control.c:436:7: style: Variable 'size' is assigned a value that is never used. [unreadVariable] size -= sizeof(const struct snd_ctl_tlv); Somehow we dropped the checks for the size argument when upstreaming the code, somewhere between v5 and v6. Re-add a size check to avoid providing userspace with more data that it asked for. Also fix all error codes, we should return -ENOSPC instead of -EINVAL. Fixes: c3078f5397046 ('ASoC: SOF: Add Sound Open Firmware KControl support') Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.h')
0 files changed, 0 insertions, 0 deletions