Merge "gsi: Fix NULL pointer dereference on event-less channels"

This commit is contained in:
qctecmdr 2020-07-15 03:05:08 -07:00 committed by Gerrit - the friendly Code Review server
commit 78ab233b35

View File

@ -2991,7 +2991,8 @@ int gsi_start_channel(unsigned long chan_hdl)
/* check if INTSET is in IRQ mode for GPI channel */
val = gsi_readl(gsi_ctx->base +
GSI_EE_n_CNTXT_INTSET_OFFS(gsi_ctx->per.ee));
if (ctx->evtr->props.intf == GSI_EVT_CHTYPE_GPI_EV &&
if (ctx->evtr &&
ctx->evtr->props.intf == GSI_EVT_CHTYPE_GPI_EV &&
val != GSI_INTR_IRQ) {
GSIERR("GSI_EE_n_CNTXT_INTSET_OFFS %d\n", val);
BUG();
@ -3074,7 +3075,8 @@ int gsi_stop_channel(unsigned long chan_hdl)
/* check if INTSET is in IRQ mode for GPI channel */
val = gsi_readl(gsi_ctx->base +
GSI_EE_n_CNTXT_INTSET_OFFS(gsi_ctx->per.ee));
if (ctx->evtr->props.intf == GSI_EVT_CHTYPE_GPI_EV &&
if (ctx->evtr &&
ctx->evtr->props.intf == GSI_EVT_CHTYPE_GPI_EV &&
val != GSI_INTR_IRQ) {
GSIERR("GSI_EE_n_CNTXT_INTSET_OFFS %d\n", val);
BUG();