aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l56.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-06-18 19:47:02 -0700
committerJakub Kicinski <kuba@kernel.org>2021-06-18 19:47:02 -0700
commitadc2e56ebe6377f5c032d96aee0feac30a640453 (patch)
treef8937ffc72e1991418b0d54a0672766237855c94 /sound/soc/codecs/cs42l56.c
parentMerge branch 'RPMSG-WWAN-CTRL-driver' (diff)
parentMerge tag 'net-5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff)
downloadlinux-dev-adc2e56ebe6377f5c032d96aee0feac30a640453.tar.xz
linux-dev-adc2e56ebe6377f5c032d96aee0feac30a640453.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Trivial conflicts in net/can/isotp.c and tools/testing/selftests/net/mptcp/mptcp_connect.sh scaled_ppm_to_ppb() was moved from drivers/ptp/ptp_clock.c to include/linux/ptp_clock_kernel.h in -next so re-apply the fix there. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs42l56.c')
-rw-r--r--sound/soc/codecs/cs42l56.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c
index c44a5cdb796e..7cdffdf6b8cf 100644
--- a/sound/soc/codecs/cs42l56.c
+++ b/sound/soc/codecs/cs42l56.c
@@ -1175,7 +1175,7 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client,
struct cs42l56_platform_data *pdata =
dev_get_platdata(&i2c_client->dev);
int ret, i;
- unsigned int devid = 0;
+ unsigned int devid;
unsigned int alpha_rev, metal_rev;
unsigned int reg;
@@ -1245,6 +1245,11 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client,
}
ret = regmap_read(cs42l56->regmap, CS42L56_CHIP_ID_1, &reg);
+ if (ret) {
+ dev_err(&i2c_client->dev, "Failed to read chip ID: %d\n", ret);
+ return ret;
+ }
+
devid = reg & CS42L56_CHIP_ID_MASK;
if (devid != CS42L56_DEVID) {
dev_err(&i2c_client->dev,