diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_api.c | 2 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index b16ad2972c6b..6ab4a2f92ca0 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -417,6 +417,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct qdisc_size_table *stab) | |||
417 | struct nlattr *nest; | 417 | struct nlattr *nest; |
418 | 418 | ||
419 | nest = nla_nest_start(skb, TCA_STAB); | 419 | nest = nla_nest_start(skb, TCA_STAB); |
420 | if (nest == NULL) | ||
421 | goto nla_put_failure; | ||
420 | NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts); | 422 | NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts); |
421 | nla_nest_end(skb, nest); | 423 | nla_nest_end(skb, nest); |
422 | 424 | ||
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 93cd30ce6501..cdcd16fcfeda 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -270,6 +270,8 @@ static void dev_watchdog_down(struct net_device *dev) | |||
270 | void netif_carrier_on(struct net_device *dev) | 270 | void netif_carrier_on(struct net_device *dev) |
271 | { | 271 | { |
272 | if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) { | 272 | if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) { |
273 | if (dev->reg_state == NETREG_UNINITIALIZED) | ||
274 | return; | ||
273 | linkwatch_fire_event(dev); | 275 | linkwatch_fire_event(dev); |
274 | if (netif_running(dev)) | 276 | if (netif_running(dev)) |
275 | __netdev_watchdog_up(dev); | 277 | __netdev_watchdog_up(dev); |
@@ -285,8 +287,11 @@ EXPORT_SYMBOL(netif_carrier_on); | |||
285 | */ | 287 | */ |
286 | void netif_carrier_off(struct net_device *dev) | 288 | void netif_carrier_off(struct net_device *dev) |
287 | { | 289 | { |
288 | if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) | 290 | if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) { |
291 | if (dev->reg_state == NETREG_UNINITIALIZED) | ||
292 | return; | ||
289 | linkwatch_fire_event(dev); | 293 | linkwatch_fire_event(dev); |
294 | } | ||
290 | } | 295 | } |
291 | EXPORT_SYMBOL(netif_carrier_off); | 296 | EXPORT_SYMBOL(netif_carrier_off); |
292 | 297 | ||