ASoC: blackfin: Delete an error message for a failed memory allocation in sport_create()
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 11 Aug 2017 19:45:37 +0000 (21:45 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 14 Aug 2017 16:28:14 +0000 (17:28 +0100)
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/blackfin/bf6xx-sport.c

index dfb7443..1bc3e0a 100644 (file)
@@ -388,10 +388,9 @@ struct sport_device *sport_create(struct platform_device *pdev)
        int ret;
 
        sport = kzalloc(sizeof(*sport), GFP_KERNEL);
-       if (!sport) {
-               dev_err(dev, "Unable to allocate memory for sport device\n");
+       if (!sport)
                return NULL;
-       }
+
        sport->pdev = pdev;
 
        ret = sport_get_resource(sport);