Zero-initialize variable chip to be on the safe side. This also allows ro remove some explicit NULL initializations. Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx> --- drivers/misc/eeprom/at24.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 837f1d88c..8fef6d5a8 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -496,7 +496,7 @@ static const struct regmap_config regmap_config_16 = { static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id) { - struct at24_platform_data chip; + struct at24_platform_data chip = {}; kernel_ulong_t magic = 0; bool writable; struct at24_data *at24; @@ -533,9 +533,6 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id) chip.flags = magic & AT24_BITMASK(AT24_SIZE_FLAGS); at24_get_pdata(dev, &chip); - - chip.setup = NULL; - chip.context = NULL; } /* both flags imply read-only */ -- 2.15.0