On Thu, Nov 07, 2013 at 10:44:45AM +0300, Dan Carpenter wrote: > We recently added a new error path and it needs a dev_put(). > > Fixes: 7adac1ec8198 ('6lowpan: Only make 6lowpan links to IEEE802154 devices') > Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> > --- > Compile tested only. Please review carefully. > > diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c > index 9497c6f..426b5df 100644 > --- a/net/ieee802154/6lowpan.c > +++ b/net/ieee802154/6lowpan.c > @@ -1358,8 +1358,10 @@ static int lowpan_newlink(struct net *src_net, struct > net_device *dev, > real_dev = dev_get_by_index(src_net, nla_get_u32(tb[IFLA_LINK])); > if (!real_dev) > return -ENODEV; > - if (real_dev->type != ARPHRD_IEEE802154) > + if (real_dev->type != ARPHRD_IEEE802154) { > + dev_put(real_dev); > return -EINVAL; > + } looks correct for me.
------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel