Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/cs47l24', 'asoc...
[sfrench/cifs-2.6.git] / sound / soc / codecs / cs42l73.c
index 3df2c473ab8834cd27d0f8daa732aaacc3526144..dde37e569ade934d98cb198196985acd1fbdd4be 100644 (file)
@@ -1289,8 +1289,7 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
        unsigned int reg;
        u32 val32;
 
-       cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private),
-                              GFP_KERNEL);
+       cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l73), GFP_KERNEL);
        if (!cs42l73)
                return -ENOMEM;
 
@@ -1304,13 +1303,11 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
        if (pdata) {
                cs42l73->pdata = *pdata;
        } else {
-               pdata = devm_kzalloc(&i2c_client->dev,
-                                    sizeof(struct cs42l73_platform_data),
-                               GFP_KERNEL);
-               if (!pdata) {
-                       dev_err(&i2c_client->dev, "could not allocate pdata\n");
+               pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata),
+                                    GFP_KERNEL);
+               if (!pdata)
                        return -ENOMEM;
-               }
+
                if (i2c_client->dev.of_node) {
                        if (of_property_read_u32(i2c_client->dev.of_node,
                                "chgfreq", &val32) >= 0)