From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-i2c@vger.kernel.org
Cc: "Björn Ardö" <bjorn.ardo@axis.com>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>
Subject: [PATCH 1/2] i2c: slave-eeprom: skip useless initialization
Date: Mon, 25 May 2020 11:59:33 +0200 [thread overview]
Message-ID: <20200525095934.3058-1-wsa+renesas@sang-engineering.com> (raw)
We have a kzalloced struct, no need to init to 0.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/i2c-slave-eeprom.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/i2c/i2c-slave-eeprom.c b/drivers/i2c/i2c-slave-eeprom.c
index 787fdb7f332f..6684852818ac 100644
--- a/drivers/i2c/i2c-slave-eeprom.c
+++ b/drivers/i2c/i2c-slave-eeprom.c
@@ -152,7 +152,6 @@ static int i2c_slave_eeprom_probe(struct i2c_client *client, const struct i2c_de
if (!eeprom)
return -ENOMEM;
- eeprom->idx_write_cnt = 0;
eeprom->num_address_bytes = flag_addr16 ? 2 : 1;
eeprom->address_mask = size - 1;
eeprom->read_only = FIELD_GET(I2C_SLAVE_FLAG_RO, id->driver_data);
--
2.20.1
next reply other threads:[~2020-05-25 9:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 9:59 Wolfram Sang [this message]
2020-05-25 9:59 ` [PATCH 2/2] i2c: slave-eeprom: update documentation to recent changes Wolfram Sang
2020-05-28 16:06 ` Wolfram Sang
2020-05-28 16:06 ` [PATCH 1/2] i2c: slave-eeprom: skip useless initialization Wolfram Sang
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=20200525095934.3058-1-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=bjorn.ardo@axis.com \
--cc=linux-i2c@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;
as well as URLs for NNTP newsgroup(s).