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

Commit 90b863dd authored by Colin Ian King's avatar Colin Ian King Committed by Guenter Roeck
Browse files

hwmon: (sht15) remove redundant check on status and send of status value



A previous commit removed bit or'ing into to the integer status
so now status is now always zero. This means that the non-zero check on
status and the sht15_send_status call will never occur; it is deadcode.
Clean this up by removing the dead code.

Detected by: CoverityScan CID#1456835 ("Logically dead code")

Fixes: aa7ab80c578c ("hwmon: (sht15) Root out platform data")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 18673114
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -925,7 +925,6 @@ static int sht15_probe(struct platform_device *pdev)
{
	int ret;
	struct sht15_data *data;
	u8 status = 0;

	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
	if (!data)
@@ -1002,13 +1001,6 @@ static int sht15_probe(struct platform_device *pdev)
	if (ret)
		goto err_release_reg;

	/* write status with platform data options */
	if (status) {
		ret = sht15_send_status(data, status);
		if (ret)
			goto err_release_reg;
	}

	ret = sysfs_create_group(&pdev->dev.kobj, &sht15_attr_group);
	if (ret) {
		dev_err(&pdev->dev, "sysfs create failed\n");