Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b83a4141 authored by Parth Y Shah's avatar Parth Y Shah Committed by Greg Kroah-Hartman
Browse files

misc: eeprom: assignment outside the if statement



Assignment of any variable should be kept outside the if statement

Signed-off-by: default avatarParth Y Shah <sparth1292@gmail.com>
Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f019f07e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -148,7 +148,8 @@ static int max6875_probe(struct i2c_client *client,
	if (client->addr & 1)
		return -ENODEV;

	if (!(data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL)))
	data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL);
	if (!data)
		return -ENOMEM;

	/* A fake client is created on the odd address */