Skip to content

Commit

Permalink
Staging: sbe-2t3e3: redundant null check before kfree()
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Beregalov <[email protected]>
Cc: Krzysztof Halasa <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
alexb0 authored and gregkh committed Apr 20, 2011
1 parent e756910 commit 24c92ea
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions drivers/staging/sbe-2t3e3/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit 24c92ea

Please sign in to comment.