Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97324
b: refs/heads/master
c: 4cc58bd
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and Jeff Garzik committed May 22, 2008
1 parent 1e4eb36 commit e640ff6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9a2f2e450b0f770bb4347ae8d48eb2dea701e24
refs/heads/master: 4cc58bdebfcb7561de401999705a5cde16674842
9 changes: 3 additions & 6 deletions trunk/drivers/net/sfc/boards.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ static void blink_led_timer(unsigned long context)
struct efx_blinker *bl = &efx->board_info.blinker;
efx->board_info.set_fault_led(efx, bl->state);
bl->state = !bl->state;
if (bl->resubmit) {
bl->timer.expires = jiffies + BLINK_INTERVAL;
add_timer(&bl->timer);
}
if (bl->resubmit)
mod_timer(&bl->timer, jiffies + BLINK_INTERVAL);
}

static void board_blink(struct efx_nic *efx, int blink)
Expand All @@ -44,8 +42,7 @@ static void board_blink(struct efx_nic *efx, int blink)
blinker->state = 0;
setup_timer(&blinker->timer, blink_led_timer,
(unsigned long)efx);
blinker->timer.expires = jiffies + BLINK_INTERVAL;
add_timer(&blinker->timer);
mod_timer(&blinker->timer, jiffies + BLINK_INTERVAL);
} else {
blinker->resubmit = 0;
if (blinker->timer.function)
Expand Down
11 changes: 5 additions & 6 deletions trunk/include/net/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -772,13 +772,12 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype,
const struct nla_policy *policy,
int len)
{
int nested_len = nla_len(nla) - NLA_ALIGN(len);

if (nested_len < 0)
if (nla_len(nla) < len)
return -1;
if (nested_len >= nla_attr_size(0))
return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len),
nested_len, policy);
if (nla_len(nla) >= NLA_ALIGN(len) + sizeof(struct nlattr))
return nla_parse_nested(tb, maxtype,
nla_data(nla) + NLA_ALIGN(len),
policy);
memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1));
return 0;
}
Expand Down

0 comments on commit e640ff6

Please sign in to comment.