Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89899
b: refs/heads/master
c: 4688be3
h: refs/heads/master
i:
  89897: 8675e9b
  89895: b43fd46
v: v3
  • Loading branch information
Stefano Brivio authored and John W. Linville committed Feb 29, 2008
1 parent adabc47 commit 4441e1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a297170dae2595f31b02e4553a3b217e115a15cf
refs/heads/master: 4688be308f35f1e0099140a179d95c5e63b2319d
14 changes: 4 additions & 10 deletions trunk/drivers/net/wireless/b43legacy/b43legacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,7 @@ enum {
# undef assert
#endif
#ifdef CONFIG_B43LEGACY_DEBUG
# define B43legacy_WARN_ON(expr) \
do { \
if (unlikely((expr))) { \
printk(KERN_INFO PFX "Test (%s) failed at:" \
" %s:%d:%s()\n", \
#expr, __FILE__, \
__LINE__, __FUNCTION__); \
} \
} while (0)
# define B43legacy_WARN_ON(x) WARN_ON(x)
# define B43legacy_BUG_ON(expr) \
do { \
if (unlikely((expr))) { \
Expand All @@ -349,7 +341,9 @@ enum {
} while (0)
# define B43legacy_DEBUG 1
#else
# define B43legacy_WARN_ON(x) do { /* nothing */ } while (0)
/* This will evaluate the argument even if debugging is disabled. */
static inline bool __b43legacy_warn_on_dummy(bool x) { return x; }
# define B43_WARN_ON(x) __b43legacy_warn_on_dummy(unlikely(!!(x)))
# define B43legacy_BUG_ON(x) do { /* nothing */ } while (0)
# define B43legacy_DEBUG 0
#endif
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/wireless/b43legacy/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,10 +1068,8 @@ static const u8 *b43legacy_generate_probe_resp(struct b43legacy_wldev *dev,
B43legacy_WARN_ON(ie_start != offsetof(struct ieee80211_mgmt,
u.beacon.variable));

if (src_size < ie_start) {
B43legacy_WARN_ON(1);
if (B43legacy_WARN_ON(src_size < ie_start))
return NULL;
}

dest_data = kmalloc(src_size, GFP_ATOMIC);
if (unlikely(!dest_data))
Expand Down

0 comments on commit 4441e1e

Please sign in to comment.