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>
This commit is contained in:
Zheyu Ma 2022-04-09 22:39:50 +08:00 • committed by Mark Brown
commit 5947b2726b
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0