File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1175,7 +1175,7 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client,
1175
1175
struct cs42l56_platform_data * pdata =
1176
1176
dev_get_platdata (& i2c_client -> dev );
1177
1177
int ret , i ;
1178
- unsigned int devid = 0 ;
1178
+ unsigned int devid ;
1179
1179
unsigned int alpha_rev , metal_rev ;
1180
1180
unsigned int reg ;
1181
1181
@@ -1245,6 +1245,11 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client,
1245
1245
}
1246
1246
1247
1247
ret = regmap_read (cs42l56 -> regmap , CS42L56_CHIP_ID_1 , & reg );
1248
+ if (ret ) {
1249
+ dev_err (& i2c_client -> dev , "Failed to read chip ID: %d\n" , ret );
1250
+ return ret ;
1251
+ }
1252
+
1248
1253
devid = reg & CS42L56_CHIP_ID_MASK ;
1249
1254
if (devid != CS42L56_DEVID ) {
1250
1255
dev_err (& i2c_client -> dev ,
You can’t perform that action at this time.
0 commit comments