From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-usb@vger.kernel.org,
Andrey Konovalov <andreyknvl@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Johan Hovold <johan@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/4] uwb: Delete an error message for a failed memory allocation in whcrc_probe()
Date: Tue, 05 Dec 2017 20:28:11 +0000 [thread overview]
Message-ID: <2857ba10-caa2-b283-da10-e292fdc8698d@users.sourceforge.net> (raw)
In-Reply-To: <994a4a57-cfe6-91b5-5fc1-d4153cc5b0e6@users.sourceforge.net>
From: Markus Elfring <elfring@users.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@users.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
WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-usb@vger.kernel.org,
Andrey Konovalov <andreyknvl@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Johan Hovold <johan@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/4] uwb: Delete an error message for a failed memory allocation in whcrc_probe()
Date: Tue, 5 Dec 2017 21:28:11 +0100 [thread overview]
Message-ID: <2857ba10-caa2-b283-da10-e292fdc8698d@users.sourceforge.net> (raw)
In-Reply-To: <994a4a57-cfe6-91b5-5fc1-d4153cc5b0e6@users.sourceforge.net>
From: Markus Elfring <elfring@users.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@users.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
next prev parent reply other threads:[~2017-12-05 20:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 20:25 [PATCH 0/4] UWB: Adjustments for four function implementations SF Markus Elfring
2017-12-05 20:25 ` SF Markus Elfring
2017-12-05 20:27 ` [PATCH 1/4] uwb: Delete an error message for a failed memory allocation in hwarc_probe() SF Markus Elfring
2017-12-05 20:27 ` SF Markus Elfring
2017-12-05 20:28 ` SF Markus Elfring [this message]
2017-12-05 20:28 ` [PATCH 2/4] uwb: Delete an error message for a failed memory allocation in whcrc_probe() SF Markus Elfring
2017-12-05 20:29 ` [PATCH 3/4] uwb/i1480/dfu/mac: Delete an error message for a failed memory allocation in fw_hdrs_loa SF Markus Elfring
2017-12-05 20:29 ` [PATCH 3/4] uwb/i1480/dfu/mac: Delete an error message for a failed memory allocation in fw_hdrs_load() SF Markus Elfring
2017-12-05 20:30 ` [PATCH 4/4] uwb/i1480/dfu/usb: Delete two error messages for a failed memory allocation in i1480_usb SF Markus Elfring
2017-12-05 20:30 ` [PATCH 4/4] uwb/i1480/dfu/usb: Delete two error messages for a failed memory allocation in i1480_usb_probe() SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2857ba10-caa2-b283-da10-e292fdc8698d@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=andreyknvl@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.