Skip to content

Commit be7664c

Browse files
Svendsen991broonie
authored andcommitted
ASoC: tlv320adcx140: fix null pointer
The "snd_soc_component" in "adcx140_priv" was only used once but never set. It was only used for reaching "dev" which is already present in "adcx140_priv". Fixes: 4e82971 ("ASoC: tlv320adcx140: Add a new kcontrol") Signed-off-by: Emil Svendsen <emas@bang-olufsen.dk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://patch.msgid.link/20260113-sound-soc-codecs-tvl320adcx140-v4-2-8f7ecec525c8@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 4130dc4 commit be7664c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

sound/soc/codecs/tlv320adcx140.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "tlv320adcx140.h"
2424

2525
struct adcx140_priv {
26-
struct snd_soc_component *component;
2726
struct regulator *supply_areg;
2827
struct gpio_desc *gpio_reset;
2928
struct regmap *regmap;
@@ -699,7 +698,6 @@ static void adcx140_pwr_ctrl(struct adcx140_priv *adcx140, bool power_state)
699698
{
700699
int pwr_ctrl = 0;
701700
int ret = 0;
702-
struct snd_soc_component *component = adcx140->component;
703701

704702
if (power_state)
705703
pwr_ctrl = ADCX140_PWR_CFG_ADC_PDZ | ADCX140_PWR_CFG_PLL_PDZ;
@@ -711,7 +709,7 @@ static void adcx140_pwr_ctrl(struct adcx140_priv *adcx140, bool power_state)
711709
ret = regmap_write(adcx140->regmap, ADCX140_PHASE_CALIB,
712710
adcx140->phase_calib_on ? 0x00 : 0x40);
713711
if (ret)
714-
dev_err(component->dev, "%s: register write error %d\n",
712+
dev_err(adcx140->dev, "%s: register write error %d\n",
715713
__func__, ret);
716714
}
717715

0 commit comments

Comments
 (0)