diff mbox

drm/tegra: checking for IS_ERR() instead of NULL

Message ID 20150817143703.GB23820@mwanda
State Accepted, archived
Headers show

Commit Message

Dan Carpenter Aug. 17, 2015, 2:37 p.m. UTC
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>

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Thierry Reding Dec. 14, 2015, 1:38 p.m. UTC | #1
On Mon, Aug 17, 2015 at 05:37:03PM +0300, Dan Carpenter wrote:
> 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>

Sorry, this fell through the cracks. Applied now, thanks.

Thierry
diff mbox

Patch

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;
 	}