Skip to content

Commit

Permalink
10090 rt2860_free_rx_ring doesn't need to check for NULL array
Browse files Browse the repository at this point in the history
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
John Levon committed Mar 22, 2019
1 parent 1752e73 commit 5e06bd5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions usr/src/uts/common/io/rwn/rt2860.c
Expand Up @@ -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.
*/

/*
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 5e06bd5

Please sign in to comment.