ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional
authorAxel Lin <axel.lin@ingics.com>
Thu, 30 Jun 2016 00:13:34 +0000 (08:13 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 1 Jul 2016 09:53:56 +0000 (11:53 +0200)
commit410fe39c6d2116aa5584083cbcbb7b3796e09f5d
treee47902ea8890c5c704e2d7239b94d4a680c69bec
parent20f12f2c4819a36de92ec6be382d0636d3485c6b
ASoC: cs35l33: Fix testing return value of devm_gpiod_get_optional

devm_gpiod_get_optional() returns NULL when the gpio is not assigned.
So the if (PTR_ERR(cs35l33->reset_gpio) == -ENOENT) test is always false.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l33.c