drm/tegra: checking for IS_ERR() instead of NULL
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 17 Aug 2015 14:37:03 +0000 (17:37 +0300)
committerThierry Reding <treding@nvidia.com>
Mon, 14 Dec 2015 13:37:25 +0000 (14:37 +0100)
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>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/sor.c

index 17e008f6081ff78da0a9278d15f0a0311a906025..a5fddd3d06a935d91fa665056fb48a8b63889df8 100644 (file)
@@ -1946,9 +1946,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;
        }