summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-02-04 13:11:54 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-02-08 16:50:56 -0500
commit40bd5203ddb6b946b55c35d1c26dfe9ec1b232f5 (patch)
tree58e44eeb367c2f8061d906e2c0009c3705d3f2a5 /drivers/net/wireless
parent5f6393ecf5cc7d064ba9172e0a2e1c64bcaaaf2f (diff)
downloadop-kernel-dev-40bd5203ddb6b946b55c35d1c26dfe9ec1b232f5.zip
op-kernel-dev-40bd5203ddb6b946b55c35d1c26dfe9ec1b232f5.tar.gz
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')
-rw-r--r--drivers/net/wireless/b43/phy_n.c4
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 074b34c..795bb1e 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,
}
samples = kzalloc(len * sizeof(struct b43_c32), GFP_KERNEL);
+ if (!samples) {
+ b43err(dev->wl, "allocation for samples generation failed\n");
+ return 0;
+ }
rot = (((freq * 36) / bw) << 16) / 100;
angle = 0;
OpenPOWER on IntegriCloud