Patchwork ixp4xx_hss. Little bug in hss_init_one

login
register
mail settings
Submitter =?ISO-8859-1?Q?Miguel_=C1ngel_=C1lvarez?=
Date Nov. 26, 2008, 5:13 p.m.
Message ID <b0438a630811260913t638343a4i5576292b367c5dc2@mail.gmail.com>
Download mbox | patch
Permalink /patch/10959/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Hi

I have found that platform_set_drvdata is not correctly called if we
have an error in requesting npe. Am I right?

Signed-off-by: Miguel Ángel Álvarez (gotzoncabanes@gmail.com)
---

Thanks

Miguel Ángel Álvarez
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Krzysztof Halasa - Dec. 4, 2008, 8:32 p.m.
Hi,

"Miguel Ángel Álvarez" <gotzoncabanes@gmail.com> writes:

> I have found that platform_set_drvdata is not correctly called if we
> have an error in requesting npe. Am I right?

Definitely. Though I will just move platform_set_drvdata() past
npe_request() (and register_hdlc_device()).

Thanks for spotting this bug.
My pleasure.

2008/12/4 Krzysztof Halasa <khc@pm.waw.pl>:
> Hi,
>
> "Miguel Ángel Álvarez" <gotzoncabanes@gmail.com> writes:
>
>> I have found that platform_set_drvdata is not correctly called if we
>> have an error in requesting npe. Am I right?
>
> Definitely. Though I will just move platform_set_drvdata() past
> npe_request() (and register_hdlc_device()).
>
> Thanks for spotting this bug.
> --
> Krzysztof Halasa
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- ixp4xx_hss.c.orig	2008-11-19 11:26:54.000000000 +0100
+++ ixp4xx_hss.c.initone	2008-11-26 18:09:22.000000000 +0100
@@ -2698,8 +2698,8 @@ 
 	free_netdev(dev);
 err_plat:
 	npe_release(port->npe);
-	platform_set_drvdata(pdev, NULL);
 err_free:
+	platform_set_drvdata(pdev, NULL);
 	kfree(port);
 	return err;
 }