diff --git a/drivers/i2c/i2c_npcx_controller.c b/drivers/i2c/i2c_npcx_controller.c index 2b4912e8591..6931fecb81d 100644 --- a/drivers/i2c/i2c_npcx_controller.c +++ b/drivers/i2c/i2c_npcx_controller.c @@ -753,7 +753,7 @@ static void i2c_ctrl_handle_read_int_event(const struct device *dev) } /* Is the STOP condition issued? */ - if ((data->msg->flags & I2C_MSG_STOP) != 0) { + if (data->msg != NULL && (data->msg->flags & I2C_MSG_STOP) != 0) { /* Clear rx FIFO threshold and status bits */ i2c_ctrl_fifo_clear_status(dev);