Skip to content

Commit

Permalink
can: janz-ican3: fix type mismatch in assignment
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
  • Loading branch information
hofrat authored and marckleinebudde committed Feb 4, 2015
1 parent 7e8acbb commit 8a00785
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/can/janz-ican3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 8a00785

Please sign in to comment.