summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/dw_mmc-k3.c
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2018-03-30 12:35:45 -0400
committerSean Paul <seanpaul@chromium.org>2018-03-30 12:35:45 -0400
commit83fd26c3f32afe38bb2ab8cc00e313ec5c2edbce (patch)
treeb2d2719c998bc2bcba99f2ecf2d164ee9b7ad75a /drivers/mmc/host/dw_mmc-k3.c
parent4165791d29f64e01860a064f3c649447dbac41c3 (diff)
parent694f54f680f7fd8e9561928fbfc537d9afbc3d79 (diff)
Merge airlied/drm-next into drm-misc-next
Backmerging to pick up a fix from drm-misc-next-fixes. Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc-k3.c')
-rw-r--r--drivers/mmc/host/dw_mmc-k3.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c
index 73fd75c3c824..89cdb3d533bb 100644
--- a/drivers/mmc/host/dw_mmc-k3.c
+++ b/drivers/mmc/host/dw_mmc-k3.c
@@ -135,6 +135,9 @@ static int dw_mci_hi6220_parse_dt(struct dw_mci *host)
if (priv->ctrl_id < 0)
priv->ctrl_id = 0;
+ if (priv->ctrl_id >= TIMING_MODE)
+ return -EINVAL;
+
host->priv = priv;
return 0;
}
@@ -207,6 +210,7 @@ static int dw_mci_hi6220_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
static const struct dw_mci_drv_data hi6220_data = {
.caps = dw_mci_hi6220_caps,
+ .num_caps = ARRAY_SIZE(dw_mci_hi6220_caps),
.switch_voltage = dw_mci_hi6220_switch_voltage,
.set_ios = dw_mci_hi6220_set_ios,
.parse_dt = dw_mci_hi6220_parse_dt,