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 5bcef13408c8..1ef25e6ee1f9 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -422,6 +422,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct qdisc_size_table *stab) | |||
422 | struct nlattr *nest; | 422 | struct nlattr *nest; |
423 | 423 | ||
424 | nest = nla_nest_start(skb, TCA_STAB); | 424 | nest = nla_nest_start(skb, TCA_STAB); |
425 | if (nest == NULL) | ||
426 | goto nla_put_failure; | ||
425 | NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts); | 427 | NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts); |
426 | nla_nest_end(skb, nest); | 428 | nla_nest_end(skb, nest); |
427 | 429 | ||
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 95ab55c064f1..5f5efe4e6072 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 | ||