diff mbox series

drm/i915/ddi: Remove redundant intel_connector NULL check

Message ID 20231006072830.581487-1-suraj.kandpal@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/ddi: Remove redundant intel_connector NULL check | expand

Commit Message

Suraj Kandpal Oct. 6, 2023, 7:28 a.m. UTC
Remove redundant intel_connector NULL check. Having it here just
creates further confusion and also the variable already gets
dereferenced before the aforementioned NULL check

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andi Shyti Oct. 7, 2023, 6:31 a.m. UTC | #1
Hi Suraj,

On Fri, Oct 06, 2023 at 12:58:31PM +0530, Suraj Kandpal wrote:
> Remove redundant intel_connector NULL check. Having it here just
> creates further confusion and also the variable already gets
> dereferenced before the aforementioned NULL check
> 
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

pushed to drm-intel-next.

Thank you,
Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 4668de45d6fe..9151d5add960 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4333,7 +4333,7 @@  static int intel_hdmi_reset_link(struct intel_encoder *encoder,
 	u8 config;
 	int ret;
 
-	if (!connector || connector->base.status != connector_status_connected)
+	if (connector->base.status != connector_status_connected)
 		return 0;
 
 	ret = drm_modeset_lock(&dev_priv->drm.mode_config.connection_mutex,