drm/i915: remove redundant checks for a null fb pointer
authorColin Ian King <colin.king@canonical.com>
Tue, 10 Dec 2019 14:23:49 +0000 (14:23 +0000)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 11 Dec 2019 16:19:28 +0000 (18:19 +0200)
A prior check and return when pointer fb is null makes
subsequent null checks on fb redundant.  Remove the redundant
null checks.

Addresses-Coverity: ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191210142349.333171-1-colin.king@canonical.com
drivers/gpu/drm/i915/i915_debugfs.c

index 6cb149ba1905a7d013bf48c0b77ecff6643f6cd7..9cd5ce5bc93bf3672a2f9cbb1c1d7b3fdc1369c9 100644 (file)
@@ -2582,8 +2582,8 @@ static void intel_plane_hw_info(struct seq_file *m, struct intel_plane *plane)
                       plane_state->hw.rotation);
 
        seq_printf(m, "\t\thw: fb=%d,%s,%dx%d, visible=%s, src=" DRM_RECT_FP_FMT ", dst=" DRM_RECT_FMT ", rotation=%s\n",
-                  fb ? fb->base.id : 0, fb ? format_name.str : "n/a",
-                  fb ? fb->width : 0, fb ? fb->height : 0,
+                  fb->base.id, format_name.str,
+                  fb->width, fb->height,
                   yesno(plane_state->uapi.visible),
                   DRM_RECT_FP_ARG(&plane_state->uapi.src),
                   DRM_RECT_ARG(&plane_state->uapi.dst),