@@ -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 */
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@gmail.com> --- drivers/misc/eeprom/at24.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)