Failure in preparing host for tranmission implies
that HS/LP transition didn't happen or failed. In this
case, initial state won't exist, but we try to use it
anyway. This change avoids doing this, instead just
forwarding the error to the caller.
Also add a missing error check.
Bug
1644102
Change-Id: I038e5ba28813cce2fc4e439d7fffcf8f3e65b4ef
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/754741
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
}
err = _tegra_dsi_write_data(dsi, cmd);
+ if (err < 0)
+ dev_err(&dc->ndev->dev, "Failed DSI write\n");
+
mdelay(delay_ms);
-fail:
+
err = tegra_dsi_restore_state(dc, dsi, init_status);
if (err < 0)
dev_err(&dc->ndev->dev, "Failed to restore prev state\n");
+fail:
return err;
}