diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-06-06 16:41:09 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-09-15 11:19:48 -0400 |
commit | 3f3d0d00734de56a0c5996f4e4433046c745592e (patch) | |
tree | b7fe33bd3724706a1458ec637e9408ff23e83231 /drivers/gpu/drm/i2c | |
parent | 64291f7db5bd8150a74ad2036f1037e6a0428df2 (diff) |
drm/i2c: tda998x: remove useless NULL checks
There is no way 'priv' can be NULL in tda998x_irq_thread() - this can
only happen if request_threaded_irq() was passed a NULL priv pointer,
and we would have crashed long before then if that was the case.
We also always ensure that priv->encoder is correctly setup, which
must have been initialised prior to the interrupt being claimed, so we
can remove this check as well.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/i2c')
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 424228be79ae..d8e97085f866 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c | |||
@@ -558,7 +558,7 @@ static void tda998x_hpd(struct work_struct *work) | |||
558 | struct tda998x_priv *priv = | 558 | struct tda998x_priv *priv = |
559 | container_of(dwork, struct tda998x_priv, dwork); | 559 | container_of(dwork, struct tda998x_priv, dwork); |
560 | 560 | ||
561 | if (priv->encoder && priv->encoder->dev) | 561 | if (priv->encoder->dev) |
562 | drm_kms_helper_hotplug_event(priv->encoder->dev); | 562 | drm_kms_helper_hotplug_event(priv->encoder->dev); |
563 | } | 563 | } |
564 | 564 | ||
@@ -570,8 +570,6 @@ static irqreturn_t tda998x_irq_thread(int irq, void *data) | |||
570 | struct tda998x_priv *priv = data; | 570 | struct tda998x_priv *priv = data; |
571 | u8 sta, cec, lvl, flag0, flag1, flag2; | 571 | u8 sta, cec, lvl, flag0, flag1, flag2; |
572 | 572 | ||
573 | if (!priv) | ||
574 | return IRQ_HANDLED; | ||
575 | sta = cec_read(priv, REG_CEC_INTSTATUS); | 573 | sta = cec_read(priv, REG_CEC_INTSTATUS); |
576 | cec = cec_read(priv, REG_CEC_RXSHPDINT); | 574 | cec = cec_read(priv, REG_CEC_RXSHPDINT); |
577 | lvl = cec_read(priv, REG_CEC_RXSHPDLEV); | 575 | lvl = cec_read(priv, REG_CEC_RXSHPDLEV); |