Skip to content

Commit

Permalink
hwmon: (ina2xx) Remove casting the return value which is a void pointer
Browse files Browse the repository at this point in the history
Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Jingoo Han authored and Guenter Roeck committed Sep 10, 2013
1 parent 98128de commit 8876dd7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/hwmon/ina2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ static int ina2xx_probe(struct i2c_client *client,
return -ENOMEM;

if (dev_get_platdata(&client->dev)) {
pdata =
(struct ina2xx_platform_data *)dev_get_platdata(&client->dev);
pdata = dev_get_platdata(&client->dev);
shunt = pdata->shunt_uohms;
} else if (!of_property_read_u32(client->dev.of_node,
"shunt-resistor", &val)) {
Expand Down

0 comments on commit 8876dd7

Please sign in to comment.