diff mbox

ixp4xx_hss. Little bug in hss_init_one

Message ID b0438a630811260913t638343a4i5576292b367c5dc2@mail.gmail.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

=?ISO-8859-1?Q?Miguel_=C1ngel_=C1lvarez?= Nov. 26, 2008, 5:13 p.m. UTC
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

Comments

Krzysztof Halasa Dec. 4, 2008, 8:32 p.m. UTC | #1
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.
=?ISO-8859-1?Q?Miguel_=C1ngel_=C1lvarez?= Dec. 5, 2008, 7:56 a.m. UTC | #2
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
diff mbox

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;
 }