diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-04-05 17:41:10 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-04-05 18:12:30 +0200 |
commit | 6a621f4bd900b42fb1560691d676d0b3cc51b731 (patch) | |
tree | e4b8df081f059bf879bc38ab34b4912d8f9ee7c6 /target/linux/ramips/files-4.14/drivers | |
parent | f9b2d369a63b32d6d114cbf1b43d4d600af4aeb6 (diff) | |
download | upstream-6a621f4bd900b42fb1560691d676d0b3cc51b731.tar.gz upstream-6a621f4bd900b42fb1560691d676d0b3cc51b731.tar.bz2 upstream-6a621f4bd900b42fb1560691d676d0b3cc51b731.zip |
ramips: fix BUG_ON on mtk-mmc driver probe
Our .dts files only have one device defined and this is unlikely to
change, so statically initialize host->id to 0.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/ramips/files-4.14/drivers')
-rw-r--r-- | target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/sd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/sd.c b/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/sd.c index daedc621bc..ebfdc065c1 100644 --- a/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/sd.c +++ b/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/sd.c @@ -2799,9 +2799,7 @@ static int msdc_drv_probe(struct platform_device *pdev) host = mmc_priv(mmc); host->hw = hw; host->mmc = mmc; - BUG_ON(pdev->id < -1); - BUG_ON(pdev->id >= ARRAY_SIZE(drv_mode)); - host->id = (pdev->id == -1) ? 0 : pdev->id; + host->id = 0; host->error = 0; host->irq = irq; host->base = (unsigned long) base; |