Message ID | 20221123143033.22416-1-jit.loon.lim@intel.com |
---|---|
State | Needs Review / ACK, archived |
Delegated to: | Marek Vasut |
Headers | show |
Series | ddr: altera: n5x: Return error if invalid DDR type is detected in argument | expand |
diff --git a/drivers/ddr/altera/sdram_n5x.c b/drivers/ddr/altera/sdram_n5x.c index 5117a5c4cf..8d28cdbc03 100644 --- a/drivers/ddr/altera/sdram_n5x.c +++ b/drivers/ddr/altera/sdram_n5x.c @@ -2430,6 +2430,9 @@ static int set_cal_res_to_umctl2(struct ddr_handoff *handoff, upd_val = GET_LOWB_DATA(readw((uintptr_t)(handoff->phy_base + DMEM_MB_CDD_CHB_WW_0_1_OFFSET))); + } else { + debug("%s: Invalid DDR controller type\n", __func__); + return -ENXIO; } upd_val = max(val, upd_val);