Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/cs47l24', 'asoc...
[sfrench/cifs-2.6.git] / sound / soc / codecs / da7218.c
index 56564ce90cb6b0cb156f08ae39cc46a828f32594..96c644a15b1137ec6ecc49868e5660553f7b6e1d 100644 (file)
@@ -2455,10 +2455,8 @@ static struct da7218_pdata *da7218_of_to_pdata(struct snd_soc_codec *codec)
        u32 of_val32;
 
        pdata = devm_kzalloc(codec->dev, sizeof(*pdata), GFP_KERNEL);
-       if (!pdata) {
-               dev_warn(codec->dev, "Failed to allocate memory for pdata\n");
+       if (!pdata)
                return NULL;
-       }
 
        if (of_property_read_u32(np, "dlg,micbias1-lvl-millivolt", &of_val32) >= 0)
                pdata->micbias1_lvl = da7218_of_micbias_lvl(codec, of_val32);
@@ -2527,8 +2525,6 @@ static struct da7218_pdata *da7218_of_to_pdata(struct snd_soc_codec *codec)
                hpldet_pdata = devm_kzalloc(codec->dev, sizeof(*hpldet_pdata),
                                            GFP_KERNEL);
                if (!hpldet_pdata) {
-                       dev_warn(codec->dev,
-                                "Failed to allocate memory for hpldet pdata\n");
                        of_node_put(hpldet_np);
                        return pdata;
                }
@@ -3273,8 +3269,7 @@ static int da7218_i2c_probe(struct i2c_client *i2c,
        struct da7218_priv *da7218;
        int ret;
 
-       da7218 = devm_kzalloc(&i2c->dev, sizeof(struct da7218_priv),
-                             GFP_KERNEL);
+       da7218 = devm_kzalloc(&i2c->dev, sizeof(*da7218), GFP_KERNEL);
        if (!da7218)
                return -ENOMEM;