From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-i2c@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/2] i2c-bfin-twi: Delete an error message for a failed memory allocation in i2c_bfin_twi_probe()
Date: Fri, 2 Feb 2018 19:12:27 +0100 [thread overview]
Message-ID: <cfd1ee7e-6f4d-7d05-b857-a509887a6bc4@users.sourceforge.net> (raw)
In-Reply-To: <740e31b4-79dd-a4bf-a2f5-001c44864b79@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 2 Feb 2018 18:55:04 +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/i2c/busses/i2c-bfin-twi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
index ff3343186a82..ed596fd56b8b 100644
--- a/drivers/i2c/busses/i2c-bfin-twi.c
+++ b/drivers/i2c/busses/i2c-bfin-twi.c
@@ -621,10 +621,8 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev)
iface = devm_kzalloc(&pdev->dev, sizeof(struct bfin_twi_iface),
GFP_KERNEL);
- if (!iface) {
- dev_err(&pdev->dev, "Cannot allocate memory\n");
+ if (!iface)
return -ENOMEM;
- }
spin_lock_init(&(iface->lock));
--
2.16.1
next prev parent reply other threads:[~2018-02-02 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 18:11 [PATCH 0/2] I2C-Blackfin TWI: Adjustments for i2c_bfin_twi_probe() SF Markus Elfring
2018-02-02 18:12 ` SF Markus Elfring [this message]
2018-02-02 18:13 ` [PATCH 2/2] i2c-bfin-twi: Improve a size determination in i2c_bfin_twi_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=cfd1ee7e-6f4d-7d05-b857-a509887a6bc4@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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
all inboxes | Powered by JetHome®