diff options
| author | Nicholas Mc Guire <der.herr@hofr.at> | 2015-02-01 03:34:34 -0500 |
|---|---|---|
| committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-02-04 08:06:43 -0500 |
| commit | 8a00785edd166361e08c6cf710bf3acdd6038005 (patch) | |
| tree | e569c83b41d1683b39ea9a09755b02e45b825f1e | |
| parent | 7e8acbb69ee2b855288afc61e3794a30e3582977 (diff) | |
can: janz-ican3: fix type mismatch in assignment
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>
| -rw-r--r-- | drivers/net/can/janz-ican3.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c index 0eb4d181ae4d..4dd183a3643a 100644 --- a/drivers/net/can/janz-ican3.c +++ b/drivers/net/can/janz-ican3.c | |||
| @@ -1679,8 +1679,7 @@ static int ican3_get_berr_counter(const struct net_device *ndev, | |||
| 1679 | if (ret) | 1679 | if (ret) |
| 1680 | return ret; | 1680 | return ret; |
| 1681 | 1681 | ||
| 1682 | ret = wait_for_completion_timeout(&mod->buserror_comp, HZ); | 1682 | if (!wait_for_completion_timeout(&mod->buserror_comp, HZ)) { |
| 1683 | if (ret == 0) { | ||
| 1684 | netdev_info(mod->ndev, "%s timed out\n", __func__); | 1683 | netdev_info(mod->ndev, "%s timed out\n", __func__); |
| 1685 | return -ETIMEDOUT; | 1684 | return -ETIMEDOUT; |
| 1686 | } | 1685 | } |
| @@ -1705,8 +1704,7 @@ static ssize_t ican3_sysfs_show_term(struct device *dev, | |||
| 1705 | if (ret) | 1704 | if (ret) |
| 1706 | return ret; | 1705 | return ret; |
| 1707 | 1706 | ||
| 1708 | ret = wait_for_completion_timeout(&mod->termination_comp, HZ); | 1707 | if (!wait_for_completion_timeout(&mod->termination_comp, HZ)) { |
| 1709 | if (ret == 0) { | ||
| 1710 | netdev_info(mod->ndev, "%s timed out\n", __func__); | 1708 | netdev_info(mod->ndev, "%s timed out\n", __func__); |
| 1711 | return -ETIMEDOUT; | 1709 | return -ETIMEDOUT; |
| 1712 | } | 1710 | } |
