diff options
Diffstat (limited to 'drivers/i2c/chips/rtc8564.c')
-rw-r--r-- | drivers/i2c/chips/rtc8564.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/chips/rtc8564.c b/drivers/i2c/chips/rtc8564.c index dd9d42d..916cdc1 100644 --- a/drivers/i2c/chips/rtc8564.c +++ b/drivers/i2c/chips/rtc8564.c @@ -148,12 +148,11 @@ static int rtc8564_attach(struct i2c_adapter *adap, int addr, int kind) {addr, I2C_M_RD, 2, data} }; - d = kmalloc(sizeof(struct rtc8564_data), GFP_KERNEL); + d = kzalloc(sizeof(struct rtc8564_data), GFP_KERNEL); if (!d) { ret = -ENOMEM; goto done; } - memset(d, 0, sizeof(struct rtc8564_data)); new_client = &d->client; strlcpy(new_client->name, "RTC8564", I2C_NAME_SIZE); |