mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "Fabio Estevam" <fabio.estevam@freescale.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	"Lothar Waßmann" <LW@KARO-electronics.de>
Subject: [PATCH 2/3] staging: drm/imx: several bug fixes
Date: Tue, 25 Dec 2012 15:58:38 +0100	[thread overview]
Message-ID: <62e9552fa6c829732eef0fce6151acc8f7f286c9.1356447103.git.LW@KARO-electronics.de> (raw)
In-Reply-To: <56060bcfc2aa06b884380d07af72fc5db6ef9685.1356447103.git.LW@KARO-electronics.de>
In-Reply-To: <56060bcfc2aa06b884380d07af72fc5db6ef9685.1356447103.git.LW@KARO-electronics.de>

- 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>
---
 drivers/staging/imx-drm/ipuv3-crtc.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c
index 1892006..4b3a019 100644
--- a/drivers/staging/imx-drm/ipuv3-crtc.c
+++ b/drivers/staging/imx-drm/ipuv3-crtc.c
@@ -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;
 	}
@@ -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;
 		}
 	}
@@ -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);
 
-- 
1.7.2.5


  reply	other threads:[~2012-12-25 14:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-25 14:58 [PATCH 1/3] staging: drm/imx: check return value of ipu_reset() Lothar Waßmann
2012-12-25 14:58 ` Lothar Waßmann [this message]
2012-12-25 14:58 ` [PATCH 3/3] staging: drm/imx: fix double free bug in error path Lothar Waßmann
2012-12-27 10:06 ` [PATCH 1/3] staging: drm/imx: check return value of ipu_reset() Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62e9552fa6c829732eef0fce6151acc8f7f286c9.1356447103.git.LW@KARO-electronics.de \
    --to=lw@karo-electronics.de \
    --cc=fabio.estevam@freescale.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®