diff options
author | Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> | 2015-02-07 14:56:10 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-07 00:55:24 (GMT) |
commit | 535f2e7df820d84fd8a4395bb52f19846f6a2290 (patch) | |
tree | bbe3128e9cc7fa34aa221e0b2196350de2bba765 | |
parent | 1b08872e59309458a54ed00cded95eeda43426e5 (diff) | |
download | linux-535f2e7df820d84fd8a4395bb52f19846f6a2290.tar.xz |
staging: rtl8192u: r8192U_core: Fix driver_info dereference as a null pointer
Fix possible use of use of driver_info as a null pointer in
query_rxdesc_status()
This could happen if stats->RxIs40MHzPacket still has the
default value of zero.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 0d64d2d..8f7a321 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -4476,13 +4476,10 @@ static void query_rxdesc_status(struct sk_buff *skb, skb_pull(skb, stats->RxBufShift + stats->RxDrvInfoSize); } - /* for debug 2008.5.29 */ - - //added by vivi, for MP, 20080108 - stats->RxIs40MHzPacket = driver_info->BW; - if (stats->RxDrvInfoSize != 0) + if (driver_info) { + stats->RxIs40MHzPacket = driver_info->BW; TranslateRxSignalStuff819xUsb(skb, stats, driver_info); - + } } static void rtl8192_rx_nomal(struct sk_buff *skb) |