ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_...
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 22 Nov 2017 14:50:46 +0000 (15:50 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Nov 2017 13:10:31 +0000 (13:10 +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>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l73.c

index 3df2c473ab8834cd27d0f8daa732aaacc3526144..978cfbbad408c3d6223747c1ca3b6d0889d16b1b 100644 (file)
@@ -1307,10 +1307,9 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
                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");
+               if (!pdata)
                        return -ENOMEM;
-               }
+
                if (i2c_client->dev.of_node) {
                        if (of_property_read_u32(i2c_client->dev.of_node,
                                "chgfreq", &val32) >= 0)