diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-02-04 07:11:54 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-08 16:50:56 -0500 |
commit | 40bd5203ddb6b946b55c35d1c26dfe9ec1b232f5 (patch) | |
tree | 58e44eeb367c2f8061d906e2c0009c3705d3f2a5 /drivers/net/wireless/b43 | |
parent | 5f6393ecf5cc7d064ba9172e0a2e1c64bcaaaf2f (diff) |
b43: N-PHY: handle allocation fail in samples generation
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 074b34c3b38..795bb1e3345 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -1069,6 +1069,10 @@ static u16 b43_nphy_gen_load_samples(struct b43_wldev *dev, u32 freq, u16 max, | |||
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | samples = kzalloc(len * sizeof(struct b43_c32), GFP_KERNEL); | 1071 | samples = kzalloc(len * sizeof(struct b43_c32), GFP_KERNEL); |
1072 | if (!samples) { | ||
1073 | b43err(dev->wl, "allocation for samples generation failed\n"); | ||
1074 | return 0; | ||
1075 | } | ||
1072 | rot = (((freq * 36) / bw) << 16) / 100; | 1076 | rot = (((freq * 36) / bw) << 16) / 100; |
1073 | angle = 0; | 1077 | angle = 0; |
1074 | 1078 | ||