diff mbox series

[1/2] i2c: slave-eeprom: skip useless initialization

Message ID 20200525095934.3058-1-wsa+renesas@sang-engineering.com
State Accepted
Headers show
Series [1/2] i2c: slave-eeprom: skip useless initialization | expand

Commit Message

Wolfram Sang May 25, 2020, 9:59 a.m. UTC
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(-)

Comments

Wolfram Sang May 28, 2020, 4:06 p.m. UTC | #1
On Mon, May 25, 2020 at 11:59:33AM +0200, Wolfram Sang wrote:
> We have a kzalloced struct, no need to init to 0.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to for-next, thanks!
diff mbox series

Patch

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);