From: Jingoo Han Date: Mon, 9 Sep 2013 05:29:32 +0000 (+0900) Subject: hwmon: (ina2xx) Remove casting the return value which is a void pointer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8876dd78d9f0cd317d55dc19e5cd17194af15b52;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git hwmon: (ina2xx) Remove casting the return value which is a void pointer 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 Acked-by: Jean Delvare Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c index 18c062360ca7..70a39a8ac016 100644 --- a/drivers/hwmon/ina2xx.c +++ b/drivers/hwmon/ina2xx.c @@ -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)) {