summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-dw.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-01-23 12:37:18 +0000
committerMark Brown <broonie@kernel.org>2020-01-23 12:37:18 +0000
commit754a36a58c29718bf5e28b8789b17bffbb60e8a6 (patch)
treee0772eb7f3248ce030b52774e57f510f85933d58 /drivers/spi/spi-dw.c
parent7265e8fc51081f08728cc7528fd4640a81ec6768 (diff)
parenta5362b84bdff1def10c136e36ef2126f7f545b2c (diff)
Merge branch 'spi-5.6' into spi-next
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r--drivers/spi/spi-dw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 25e897e3af22..31e3f866d11a 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -472,7 +472,8 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
struct spi_controller *master;
int ret;
- BUG_ON(dws == NULL);
+ if (!dws)
+ return -EINVAL;
master = spi_alloc_master(dev, 0);
if (!master)