|
@@ -1210,11 +1210,9 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client,
|
|
|
pdata = devm_kzalloc(&i2c_client->dev,
|
|
|
sizeof(struct cs42l56_platform_data),
|
|
|
GFP_KERNEL);
|
|
|
- if (!pdata) {
|
|
|
- dev_err(&i2c_client->dev,
|
|
|
- "could not allocate pdata\n");
|
|
|
+ if (!pdata)
|
|
|
return -ENOMEM;
|
|
|
- }
|
|
|
+
|
|
|
if (i2c_client->dev.of_node) {
|
|
|
ret = cs42l56_handle_of_data(i2c_client,
|
|
|
&cs42l56->pdata);
|