]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: Intel: Check the bar size before remapping
authorZheyu Ma <zheyuma97@gmail.com>
Sat, 9 Apr 2022 14:39:50 +0000 (22:39 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 13 Apr 2022 12:47:40 +0000 (13:47 +0100)
commit77c49540e5e545ae89690bba566b25ec6c62a7dd
treedb2533841b67624d940c8908ed6f4b47fff8bf02
parente8a1ea67694d6d46503ca9e991768f3094844fd5
ASoC: SOF: Intel: Check the bar size before remapping

The driver should use the pci_resource_len() to get the actual length of
pci bar, and compare it with the expect value. If the bar size is too
small (such as a broken device), the driver should return an error.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220409143950.2570186-1-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/pci-tng.c