Message ID | 20230211191315.24554-1-alex@shruggie.ro (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | sound: soc: codec: tlv320adcx140: fix 'ti,gpio-config' DT property init | expand |
On Sat, Feb 11, 2023 at 09:13:15PM +0200, Alexandru Ardelean wrote: > From: Steffen Aschbacher <steffen.aschbacher@stihl.de> > > When the 'ti,gpio-config' property is not defined, the > device_property_count_u32() will return an error, rather than zero. Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.
On Mon, Feb 13, 2023 at 2:38 PM Mark Brown <broonie@kernel.org> wrote: > > On Sat, Feb 11, 2023 at 09:13:15PM +0200, Alexandru Ardelean wrote: > > From: Steffen Aschbacher <steffen.aschbacher@stihl.de> > > > > When the 'ti,gpio-config' property is not defined, the > > device_property_count_u32() will return an error, rather than zero. > > Please submit patches using subject lines reflecting the style for the > subsystem, this makes it easier for people to identify relevant patches. Ack. > Look at what existing commits in the area you're changing are doing and > make sure your subject lines visually resemble what they're doing. Will do. > There's no need to resubmit to fix this alone. Thank you :)
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c index 91a22d927915..530f321d08e9 100644 --- a/sound/soc/codecs/tlv320adcx140.c +++ b/sound/soc/codecs/tlv320adcx140.c @@ -925,7 +925,7 @@ static int adcx140_configure_gpio(struct adcx140_priv *adcx140) gpio_count = device_property_count_u32(adcx140->dev, "ti,gpio-config"); - if (gpio_count == 0) + if (gpio_count <= 0) return 0; if (gpio_count != ADCX140_NUM_GPIO_CFGS)