Message ID | 20171222000108.9533-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c index 755462a4c75e..8b2c77f516b9 100644 --- a/drivers/slimbus/messaging.c +++ b/drivers/slimbus/messaging.c @@ -170,8 +170,9 @@ static int slim_val_inf_sanity(struct slim_controller *ctrl, break; } reterr: - dev_err(ctrl->dev, "Sanity check failed:msg:offset:0x%x, mc:%d\n", - msg->start_offset, mc); + if (msg) + dev_err(ctrl->dev, "Sanity check failed:msg:offset:0x%x, mc:%d\n", + msg->start_offset, mc); return -EINVAL; }