ASoC: da7213: Delete an error message for a failed memory allocation in da7213_fw_to_...
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 23 Nov 2017 16:56:54 +0000 (17:56 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Nov 2017 12:59:46 +0000 (12:59 +0000)
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/da7213.c

index 41d9b1da27c221272b54ad20846fb5cde3ee76ca..d1b77a0e3b74f43fa6d450dccc33255a307b9783 100644 (file)
@@ -1654,10 +1654,8 @@ static struct da7213_platform_data
        u32 fw_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 (device_property_read_u32(dev, "dlg,micbias1-lvl", &fw_val32) >= 0)
                pdata->micbias1_lvl = da7213_of_micbias_lvl(codec, fw_val32);