]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: cs42l56: Delete an error message for a failed memory allocation in cs42l56_i2c_...
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 23 Nov 2017 08:26:08 +0000 (09:26 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Nov 2017 13:00:33 +0000 (13:00 +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/cs42l56.c

index cb6ca85f15362cca9d11a1dfe9519f012dd82466..13ee46217d783a4478bb7b5b714cba747a5087ec 100644 (file)
@@ -1210,11 +1210,9 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client,
                pdata = devm_kzalloc(&i2c_client->dev,
                                     sizeof(struct cs42l56_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) {
                        ret = cs42l56_handle_of_data(i2c_client,
                                                     &cs42l56->pdata);