projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45d2530
)
chelsio: error path fix
author
Stephen Hemminger
<shemminger@osdl.org>
Mon, 8 Jan 2007 19:24:26 +0000
(11:24 -0800)
committer
Jeff Garzik
<jeff@garzik.org>
Tue, 9 Jan 2007 07:24:37 +0000
(
02:24
-0500)
Fix handling of allocation failure.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/chelsio/my3126.c
patch
|
blob
|
history
diff --git
a/drivers/net/chelsio/my3126.c
b/drivers/net/chelsio/my3126.c
index
c7731b6
..
82fed1d
100644
(file)
--- a/
drivers/net/chelsio/my3126.c
+++ b/
drivers/net/chelsio/my3126.c
@@
-170,9
+170,10
@@
static struct cphy *my3126_phy_create(adapter_t *adapter,
{
struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL);
- if (cphy)
-
cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops)
;
+ if (
!
cphy)
+
return NULL
;
+ cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops);
INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll);
cphy->bmsr = 0;