Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1627194 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-04-20 10:30 +0200 |
| Last post | 2017-04-22 04:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-20 10:30 +0200
Re: [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe() Stephen Boyd <sboyd@codeaurora.org> - 2017-04-22 04:50 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-04-20 10:30 +0200 |
| Subject | [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe() |
| Message-ID | <tyfDs-6zX-15@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 07:34:54 +0200
The script "checkpatch.pl" pointed information out like the following.
* CHECK: Comparison to NULL could be written "!drvdata"
Thus adjust this expression.
* WARNING: Possible unnecessary 'out of memory' message
Thus remove such a statement here.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/clk/clk-si5351.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
index a4c009e1e70d..2492442eea77 100644
--- a/drivers/clk/clk-si5351.c
+++ b/drivers/clk/clk-si5351.c
@@ -1354,10 +1354,8 @@ static int si5351_i2c_probe(struct i2c_client *client,
return -EINVAL;
drvdata = devm_kzalloc(&client->dev, sizeof(*drvdata), GFP_KERNEL);
- if (drvdata == NULL) {
- dev_err(&client->dev, "unable to allocate driver data\n");
+ if (!drvdata)
return -ENOMEM;
- }
i2c_set_clientdata(client, drvdata);
drvdata->client = client;
--
2.12.2
[toc] | [next] | [standalone]
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2017-04-22 04:50 +0200 |
| Subject | Re: [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe() |
| Message-ID | <tyThv-5w6-1@gated-at.bofh.it> |
| In reply to | #1627194 |
On 04/20, SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Thu, 20 Apr 2017 07:34:54 +0200 > > The script "checkpatch.pl" pointed information out like the following. > > * CHECK: Comparison to NULL could be written "!drvdata" > > Thus adjust this expression. > > > * WARNING: Possible unnecessary 'out of memory' message > > Thus remove such a statement here. > > Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- Applied to clk-next -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web