Skip to content

Commit

Permalink
staging: drm/imx: several bug fixes
Browse files Browse the repository at this point in the history
- convert bogus IS_ERR_OR_NULL() to IS_ERR()
- fix copy/paste error
- check return value of ipu_crtc_init()

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Lothar Waßmann authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent 4d27b2c commit 9a8f3f4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/staging/imx-drm/ipuv3-crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static int ipu_get_resources(struct ipu_crtc *ipu_crtc,
int ret;

ipu_crtc->ipu_ch = ipu_idmac_get(ipu, pdata->dma[0]);
if (IS_ERR_OR_NULL(ipu_crtc->ipu_ch)) {
if (IS_ERR(ipu_crtc->ipu_ch)) {
ret = PTR_ERR(ipu_crtc->ipu_ch);
goto err_out;
}
Expand All @@ -472,7 +472,7 @@ static int ipu_get_resources(struct ipu_crtc *ipu_crtc,
if (pdata->dp >= 0) {
ipu_crtc->dp = ipu_dp_get(ipu, pdata->dp);
if (IS_ERR(ipu_crtc->dp)) {
ret = PTR_ERR(ipu_crtc->ipu_ch);
ret = PTR_ERR(ipu_crtc->dp);
goto err_out;
}
}
Expand Down Expand Up @@ -548,6 +548,8 @@ static int ipu_drm_probe(struct platform_device *pdev)
ipu_crtc->dev = &pdev->dev;

ret = ipu_crtc_init(ipu_crtc, pdata);
if (ret)
return ret;

platform_set_drvdata(pdev, ipu_crtc);

Expand Down

0 comments on commit 9a8f3f4

Please sign in to comment.