If we got error before ieee802154_register_device(lp->dev) it will got to the label free_del.
Without registering ieee802154 device you are freeing it. free_dev: ieee802154_free_device(lp->dev); I think you need to rework on this. Thanks. -Varka Bhadram. On Fri, Jun 13, 2014 at 12:57 AM, Alexander Aring <alex.ar...@gmail.com> wrote: > On Thu, Jun 12, 2014 at 09:03:50PM +0200, buckheis...@itwm.fraunhofer.de > wrote: >> > Signed-off-by: Alexander Aring <alex.ar...@gmail.com> >> > --- >> > drivers/net/ieee802154/at86rf2xx.c | 6 +----- >> > 1 file changed, 1 insertion(+), 5 deletions(-) >> > >> > diff --git a/drivers/net/ieee802154/at86rf2xx.c >> > b/drivers/net/ieee802154/at86rf2xx.c >> > index 8e67179..be82fa3 100644 >> > --- a/drivers/net/ieee802154/at86rf2xx.c >> > +++ b/drivers/net/ieee802154/at86rf2xx.c >> > @@ -1338,11 +1338,7 @@ static int at86rf2xx_probe(struct spi_device *spi) >> > if (rc) >> > goto free_dev; >> > >> > - rc = ieee802154_register_device(lp->dev); >> > - if (rc) >> > - goto free_dev; >> > - >> > - return rc; >> > + return ieee802154_register_device(lp->dev); >> >> You now leak lp->dev (at least) if ieee802154_register_device fails, I >> don't think you want that. >> > > ehm, yes indeed. Sorry :-) > > Thanks. > > - Alex > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Linux-zigbee-devel mailing list > Linux-zigbee-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel