can: janz-ican3: fix type mismatch in assignment
authorNicholas Mc Guire <der.herr@hofr.at>
Sun, 1 Feb 2015 08:34:34 +0000 (03:34 -0500)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 4 Feb 2015 13:06:43 +0000 (14:06 +0100)
return type of wait_for_completion_timeout is unsigned long not int, this patch
removes the type mismatch by moving the call into the condition.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/janz-ican3.c

index 0eb4d181ae4d2e50a6790e138e8dae2a60739b8e..4dd183a3643ae3cbe358455f2b099f54dda7870e 100644 (file)
@@ -1679,8 +1679,7 @@ static int ican3_get_berr_counter(const struct net_device *ndev,
        if (ret)
                return ret;
 
-       ret = wait_for_completion_timeout(&mod->buserror_comp, HZ);
-       if (ret == 0) {
+       if (!wait_for_completion_timeout(&mod->buserror_comp, HZ)) {
                netdev_info(mod->ndev, "%s timed out\n", __func__);
                return -ETIMEDOUT;
        }
@@ -1705,8 +1704,7 @@ static ssize_t ican3_sysfs_show_term(struct device *dev,
        if (ret)
                return ret;
 
-       ret = wait_for_completion_timeout(&mod->termination_comp, HZ);
-       if (ret == 0) {
+       if (!wait_for_completion_timeout(&mod->termination_comp, HZ)) {
                netdev_info(mod->ndev, "%s timed out\n", __func__);
                return -ETIMEDOUT;
        }
This page took 0.045061 seconds and 5 git commands to generate.