Commit 3f3d0d00 authored by Russell King's avatar Russell King

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 64291f7d
...@@ -558,7 +558,7 @@ static void tda998x_hpd(struct work_struct *work) ...@@ -558,7 +558,7 @@ static void tda998x_hpd(struct work_struct *work)
struct tda998x_priv *priv = struct tda998x_priv *priv =
container_of(dwork, struct tda998x_priv, dwork); container_of(dwork, struct tda998x_priv, dwork);
if (priv->encoder && priv->encoder->dev) if (priv->encoder->dev)
drm_kms_helper_hotplug_event(priv->encoder->dev); drm_kms_helper_hotplug_event(priv->encoder->dev);
} }
...@@ -570,8 +570,6 @@ static irqreturn_t tda998x_irq_thread(int irq, void *data) ...@@ -570,8 +570,6 @@ static irqreturn_t tda998x_irq_thread(int irq, void *data)
struct tda998x_priv *priv = data; struct tda998x_priv *priv = data;
u8 sta, cec, lvl, flag0, flag1, flag2; u8 sta, cec, lvl, flag0, flag1, flag2;
if (!priv)
return IRQ_HANDLED;
sta = cec_read(priv, REG_CEC_INTSTATUS); sta = cec_read(priv, REG_CEC_INTSTATUS);
cec = cec_read(priv, REG_CEC_RXSHPDINT); cec = cec_read(priv, REG_CEC_RXSHPDINT);
lvl = cec_read(priv, REG_CEC_RXSHPDLEV); lvl = cec_read(priv, REG_CEC_RXSHPDLEV);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment