Skip to contentSkip to conversation

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

PATCH In review Dan Carpenter 2 participants 2 messages Aug 17, 2015 – Dec 14, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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

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

Fixes 459cc2c6800b ('drm/tegra: sor: Add HDMI support')
drivers/gpu/drm/tegra/sor.c +3 -3
index da1715e..08c5461 100644
@@ -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;
 	}
 
#1 lore raw
Quoted 5 lines · Dan Carpenter

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

Fixes 459cc2c6800b ('drm/tegra: sor: Add HDMI support')

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

Thierry