[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2857ba10-caa2-b283-da10-e292fdc8698d@users.sourceforge.net>
Date: Tue, 5 Dec 2017 21:28:11 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-usb@...r.kernel.org,
Andrey Konovalov <andreyknvl@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Johan Hovold <johan@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 2/4] uwb: Delete an error message for a failed memory
allocation in whcrc_probe()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 5 Dec 2017 20:43:31 +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@...rs.sourceforge.net>
---
drivers/uwb/whc-rc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/uwb/whc-rc.c b/drivers/uwb/whc-rc.c
index 3ae3c702500d..f69511166aad 100644
--- a/drivers/uwb/whc-rc.c
+++ b/drivers/uwb/whc-rc.c
@@ -374,10 +374,9 @@ int whcrc_probe(struct umc_dev *umc_dev)
goto error_rc_alloc;
}
whcrc = kzalloc(sizeof(*whcrc), GFP_KERNEL);
- if (whcrc == NULL) {
- dev_err(dev, "unable to allocate WHC-RC instance\n");
+ if (!whcrc)
goto error_alloc;
- }
+
whcrc_init(whcrc);
whcrc->umc_dev = umc_dev;
--
2.15.1
Powered by blists - more mailing lists