From: SF Markus Elfring <elfring@users.sourceforge.net>
To: kernel-janitors@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] misc/fsa9480: Delete an error message for a failed memory allocation in fsa9480_probe()
Date: Sun, 7 Jan 2018 22:29:24 +0100 [thread overview]
Message-ID: <ee60caf2-efb2-fffb-3864-84971c834ec5@users.sourceforge.net> (raw)
In-Reply-To: <afa46cf0-1a3a-e311-7fbd-d63a23785b16@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 7 Jan 2018 22:17:53 +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/misc/fsa9480.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/misc/fsa9480.c b/drivers/misc/fsa9480.c
index 71d2793b372c..4d7f763195bc 100644
--- a/drivers/misc/fsa9480.c
+++ b/drivers/misc/fsa9480.c
@@ -418,10 +418,8 @@ static int fsa9480_probe(struct i2c_client *client,
return -EIO;
usbsw = kzalloc(sizeof(struct fsa9480_usbsw), GFP_KERNEL);
- if (!usbsw) {
- dev_err(&client->dev, "failed to allocate driver data\n");
+ if (!usbsw)
return -ENOMEM;
- }
usbsw->client = client;
usbsw->pdata = client->dev.platform_data;
--
2.15.1
next prev parent reply other threads:[~2018-01-07 21:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-07 21:28 [PATCH 0/2] misc/fsa9480: Adjustments for fsa9480_probe() SF Markus Elfring
2018-01-07 21:29 ` SF Markus Elfring [this message]
2018-01-07 21:30 ` [PATCH 2/2] misc/fsa9480: Improve a size determination in fsa9480_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=ee60caf2-efb2-fffb-3864-84971c834ec5@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome