diff options
author | Anderson Lizardo <anderson.lizardo@indt.org.br> | 2008-09-17 11:34:33 -0400 |
---|---|---|
committer | David Vrabel <dv02@dv02pc01.europe.root.pri> | 2008-09-17 11:54:32 -0400 |
commit | 9d839477f85438695bd870898ffa77347e61b637 (patch) | |
tree | fc10478db6dbc280739875a2677ee84a4fce587d /drivers/uwb | |
parent | b0a81328c287052cedf28e06d9b4648ad10b72d7 (diff) |
uwb: Fix handling IEs with empty IE data in uwb_est_get_size()
A DRP notification may sometimes have empty IE data. This patch fixes
uwb_est_get_size() so that this case is handled properly.
Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/uwb')
-rw-r--r-- | drivers/uwb/est.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/uwb/est.c b/drivers/uwb/est.c index 1667afb704d3..3791cd95b63d 100644 --- a/drivers/uwb/est.c +++ b/drivers/uwb/est.c | |||
@@ -395,7 +395,7 @@ ssize_t uwb_est_get_size(struct uwb_rc *uwb_rc, struct uwb_est *est, | |||
395 | case UWB_EST_8: type_size = sizeof(u8); break; | 395 | case UWB_EST_8: type_size = sizeof(u8); break; |
396 | default: BUG(); | 396 | default: BUG(); |
397 | } | 397 | } |
398 | if (offset + type_size >= rceb_size) { | 398 | if (offset + type_size > rceb_size) { |
399 | if (printk_ratelimit()) | 399 | if (printk_ratelimit()) |
400 | dev_err(dev, "EST %p 0x%04x/%04x/%04x[%u]: " | 400 | dev_err(dev, "EST %p 0x%04x/%04x/%04x[%u]: " |
401 | "not enough data to read extra size\n", | 401 | "not enough data to read extra size\n", |