Skip to content

Commit

Permalink
OMAPDSS: HDMI: fix devm_ioremap_resource error checks
Browse files Browse the repository at this point in the history
devm_ioremap_resource returns ERR_PTR on error, not NULL. Fix the
error checks in the driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Tomi Valkeinen committed May 23, 2014
1 parent 2dcfdc3 commit 2b22df8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions drivers/video/fbdev/omap2/dss/hdmi4_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,9 +1009,9 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
}

core->base = devm_ioremap_resource(&pdev->dev, res);
if (!core->base) {
if (IS_ERR(core->base)) {
DSSERR("can't ioremap CORE\n");
return -ENOMEM;
return PTR_ERR(core->base);
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/omap2/dss/hdmi5_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,9 @@ int hdmi5_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
}

core->base = devm_ioremap_resource(&pdev->dev, res);
if (!core->base) {
if (IS_ERR(core->base)) {
DSSERR("can't ioremap HDMI core\n");
return -ENOMEM;
return PTR_ERR(core->base);
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/omap2/dss/hdmi_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ int hdmi_phy_init(struct platform_device *pdev, struct hdmi_phy_data *phy)
}

phy->base = devm_ioremap_resource(&pdev->dev, res);
if (!phy->base) {
if (IS_ERR(phy->base)) {
DSSERR("can't ioremap TX PHY\n");
return -ENOMEM;
return PTR_ERR(phy->base);
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/omap2/dss/hdmi_pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ int hdmi_pll_init(struct platform_device *pdev, struct hdmi_pll_data *pll)
}

pll->base = devm_ioremap_resource(&pdev->dev, res);
if (!pll->base) {
if (IS_ERR(pll->base)) {
DSSERR("can't ioremap PLLCTRL\n");
return -ENOMEM;
return PTR_ERR(pll->base);
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/video/fbdev/omap2/dss/hdmi_wp.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp)
}

wp->base = devm_ioremap_resource(&pdev->dev, res);
if (!wp->base) {
if (IS_ERR(wp->base)) {
DSSERR("can't ioremap HDMI WP\n");
return -ENOMEM;
return PTR_ERR(wp->base);
}

return 0;
Expand Down

0 comments on commit 2b22df8

Please sign in to comment.