提交 b83a4141 编写于 作者: P Parth Y Shah 提交者: Greg Kroah-Hartman

misc: eeprom: assignment outside the if statement

Assignment of any variable should be kept outside the if statement
Signed-off-by: NParth Y Shah <sparth1292@gmail.com>
Reviewed-by: NJean Delvare <jdelvare@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f019f07e
...@@ -148,7 +148,8 @@ static int max6875_probe(struct i2c_client *client, ...@@ -148,7 +148,8 @@ static int max6875_probe(struct i2c_client *client,
if (client->addr & 1) if (client->addr & 1)
return -ENODEV; return -ENODEV;
if (!(data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL))) data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL);
if (!data)
return -ENOMEM; return -ENOMEM;
/* A fake client is created on the odd address */ /* A fake client is created on the odd address */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册