public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] drm/tegra: checking for IS_ERR() instead of NULL
@ 2015-08-17 14:37 Dan Carpenter
  2015-12-14 13:38 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-08-17 14:37 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Terje Bergström, David Airlie, Stephen Warren,
	Alexandre Courbot, dri-devel, linux-tegra, linux-kernel,
	kernel-janitors

The tegra_sor_hdmi_find_settings() function returns NULL on error and
not an ERR_PTR.

Fixes: 459cc2c6800b ('drm/tegra: sor: Add HDMI support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index da1715e..08c5461 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -1961,9 +1961,9 @@ static void tegra_sor_hdmi_enable(struct drm_encoder *encoder)
 
 	/* production settings */
 	settings = tegra_sor_hdmi_find_settings(sor, mode->clock * 1000);
-	if (IS_ERR(settings)) {
-		dev_err(sor->dev, "no settings for pixel clock %d Hz: %ld\n",
-			mode->clock * 1000, PTR_ERR(settings));
+	if (!settings) {
+		dev_err(sor->dev, "no settings for pixel clock %d Hz\n",
+			mode->clock * 1000);
 		return;
 	}
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-14 13:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-17 14:37 [patch] drm/tegra: checking for IS_ERR() instead of NULL Dan Carpenter
2015-12-14 13:38 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox