diff options
author | John Levon <john.levon@joyent.com> | 2018-12-18 13:25:18 +0000 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2019-03-21 23:03:20 -0700 |
commit | 5e06bd59d59926d13427e57eb4e217f32c667310 (patch) | |
tree | dadcb062635cc30ca65dc1da0eb6fbdf2a31faf4 | |
parent | 1752e73c5b177fe2f2284c58df9d4e11fa24ffdf (diff) | |
download | illumos-joyent-5e06bd59d59926d13427e57eb4e217f32c667310.tar.gz |
10090 rt2860_free_rx_ring doesn't need to check for NULL array
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r-- | usr/src/uts/common/io/rwn/rt2860.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/uts/common/io/rwn/rt2860.c b/usr/src/uts/common/io/rwn/rt2860.c index e3df2a765c..5aaeebb4ac 100644 --- a/usr/src/uts/common/io/rwn/rt2860.c +++ b/usr/src/uts/common/io/rwn/rt2860.c @@ -2,6 +2,7 @@ * Copyright 2017 Gary Mills * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright (c) 2018, Joyent, Inc. */ /* @@ -900,11 +901,10 @@ rt2860_free_rx_ring(struct rt2860_softc *sc, struct rt2860_rx_ring *ring) rt2860_free_dma_mem(&ring->rxdesc_dma); count = RT2860_RX_RING_COUNT; - if (ring->data != NULL) { - for (i = 0; i < count; i++) { - data = &ring->data[i]; - rt2860_free_dma_mem(&data->rxbuf_dma); - } + + for (i = 0; i < count; i++) { + data = &ring->data[i]; + rt2860_free_dma_mem(&data->rxbuf_dma); } } |