ssb: Delete an error message for a failed memory allocation in ssb_devices_register()
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 17 May 2017 16:12:16 +0000 (18:12 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 May 2017 13:46:51 +0000 (16:46 +0300)
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Michael Büsch <m@bues.ch>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/ssb/main.c

index d1a750760cf30b270b44929ac91eb22971d15b22..65420a9f0e8202b1fb7d1214239c717b8fb25bbd 100644 (file)
@@ -480,7 +480,6 @@ static int ssb_devices_register(struct ssb_bus *bus)
 
                devwrap = kzalloc(sizeof(*devwrap), GFP_KERNEL);
                if (!devwrap) {
-                       ssb_err("Could not allocate device\n");
                        err = -ENOMEM;
                        goto error;
                }