]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ASoC: cs42l52: Delete an error message for a failed memory allocation in cs42l52_i2c_...
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 22 Nov 2017 21:08:06 +0000 (22:08 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Nov 2017 13:01:02 +0000 (13:01 +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/cs42l52.c

index 0d9c4a57301bb4a150c34d0f4e29384cd55915f5..e8645f2ac0d96397595a42e0210245f11cc522ef 100644 (file)
@@ -1118,10 +1118,9 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
                pdata = devm_kzalloc(&i2c_client->dev,
                                     sizeof(struct cs42l52_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_bool(i2c_client->dev.of_node,
                                "cirrus,mica-differential-cfg"))