diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2011-03-26 17:18:10 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-20 20:45:57 (GMT) |
commit | 24c92eac7e5976b07f663e1149d73075aff96c0d (patch) | |
tree | be9ab7313adcb57db40a2c0951530447178fcfb4 /drivers/staging/sbe-2t3e3 | |
parent | e756910059068f2b247fb8aa6e37e5685b85a0ea (diff) | |
download | linux-24c92eac7e5976b07f663e1149d73075aff96c0d.tar.xz |
Staging: sbe-2t3e3: redundant null check before kfree()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/sbe-2t3e3')
-rw-r--r-- | drivers/staging/sbe-2t3e3/dc.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/staging/sbe-2t3e3/dc.c b/drivers/staging/sbe-2t3e3/dc.c index dc53016..9dc4ec2 100644 --- a/drivers/staging/sbe-2t3e3/dc.c +++ b/drivers/staging/sbe-2t3e3/dc.c @@ -442,15 +442,10 @@ void dc_drop_descriptor_list(struct channel *sc) } } - if (sc->ether.rx_ring != NULL) { - kfree(sc->ether.rx_ring); - sc->ether.rx_ring = NULL; - } - - if (sc->ether.tx_ring != NULL) { - kfree(sc->ether.tx_ring); - sc->ether.tx_ring = NULL; - } + kfree(sc->ether.rx_ring); + sc->ether.rx_ring = NULL; + kfree(sc->ether.tx_ring); + sc->ether.tx_ring = NULL; } |