]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw: Avoid BUG_ON() in case of host failure
authorAditya Pakki <pakki001@umn.edu>
Thu, 5 Dec 2019 23:14:21 +0000 (17:14 -0600)
committerMark Brown <broonie@kernel.org>
Wed, 11 Dec 2019 16:49:47 +0000 (16:49 +0000)
commitc11e77898668bb305983bf463a10589d0f7a794f
tree7b72d21e87f288729ab851ef42b7361003769d7a
parentb838219cd3eee74ea73784ac086367238034f540
spi: dw: Avoid BUG_ON() in case of host failure

If dws is NULL in dw_spi_host_add(), we return the error to the
upper callers instead of crashing. The patch replaces BUG_ON by
returning -EINVAL to the caller.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Link: https://lore.kernel.org/r/20191205231421.9333-1-pakki001@umn.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw.c