[PATCH 4.8 126/138] omapfb: fix return value check in dsi_bind()

From: Greg Kroah-Hartman
Date: Wed Nov 09 2016 - 06:11:02 EST


4.8-stable review patch. If anyone has any objections, please let me know.

------------------

From: Wei Yongjun <weiyongjun1@xxxxxxxxxx>

commit 43da7575cdecaf5af2d6b3f3a9e4e6c9144be428 upstream.

Fix the retrn value check which testing the wrong variable
in dsi_bind().

Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb")
Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@xxxxxx>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c
@@ -5348,7 +5348,7 @@ static int dsi_bind(struct device *dev,

dsi->phy_base = devm_ioremap(&dsidev->dev, res->start,
resource_size(res));
- if (!dsi->proto_base) {
+ if (!dsi->phy_base) {
DSSERR("can't ioremap DSI PHY\n");
return -ENOMEM;
}
@@ -5368,7 +5368,7 @@ static int dsi_bind(struct device *dev,

dsi->pll_base = devm_ioremap(&dsidev->dev, res->start,
resource_size(res));
- if (!dsi->proto_base) {
+ if (!dsi->pll_base) {
DSSERR("can't ioremap DSI PLL\n");
return -ENOMEM;
}