diff options
Diffstat (limited to 'drivers/atm')
-rw-r--r-- | drivers/atm/horizon.c | 4 | ||||
-rw-r--r-- | drivers/atm/solos-pci.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 6b969f8c684..01ce241dbea 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c @@ -641,7 +641,7 @@ static int make_rate (const hrz_dev * dev, u32 c, rounding r, pre = 1; break; case round_nearest: - pre = (br+(c<<div)/2)/(c<<div); + pre = DIV_ROUND_CLOSEST(br, c<<div); // but p must be non-zero if (!pre) pre = 1; @@ -671,7 +671,7 @@ static int make_rate (const hrz_dev * dev, u32 c, rounding r, pre = DIV_ROUND_UP(br, c<<div); break; case round_nearest: - pre = (br+(c<<div)/2)/(c<<div); + pre = DIV_ROUND_CLOSEST(br, c<<div); break; default: /* round_up */ pre = br/(c<<div); diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 9359613addc..307321b32cb 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c @@ -372,7 +372,7 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb } snr = next_string(skb); - if (!str) + if (!snr) return -EIO; attn = next_string(skb); if (!attn) |