diff options
author | Thierry Reding <[email protected]> | 2021-04-16 09:11:46 +0200 |
---|---|---|
committer | Mark Brown <[email protected]> | 2021-04-16 16:54:08 +0100 |
commit | 0f687d826736a5b4eee03170382fe54d413b912a (patch) | |
tree | b9381d1f457f60c24daeb8f79121bef22fe53869 /include/linux/overflow.h | |
parent | d97140033948363ffdf5ed71dd2366f717e120e7 (diff) |
ASoC: simple-card-utils: Propagate errors on too many links
The DAI counting code doesn't propagate errors when the number of
maximum links is exceeded, which causes subsequent initialization code
to continue to run and that eventually leads to memory corruption with
the code trying to access memory that is out of bounds.
Fix this by propagating errors when the maximum number of links is
reached, which ensures that the driver fails to load and prevents the
memory corruption.
Fixes: f2138aed231c ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform")
Signed-off-by: Thierry Reding <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Jon Hunter <[email protected]>
Tested-by: Jon Hunter <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions