summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Aberg <maberg@gaisler.com>2015-06-30 15:00:51 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2017-03-06 07:54:55 +0100
commit3395ca991255b2fb2759839b8c728829b9388641 (patch)
treeda59be9e7987cdcc41bdffb864f90501b534d8d7
parentleon, gr1553b: RT status words register declarations fix (diff)
downloadrtems-3395ca991255b2fb2759839b8c728829b9388641.tar.bz2
leon, grspw_pkt: Fixed parameter check in grspw_dma_open()
-rw-r--r--c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c b/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
index 037b63c772..96348ae758 100644
--- a/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
+++ b/c/src/lib/libbsp/sparc/shared/spw/grspw_pkt.c
@@ -1599,7 +1599,7 @@ void *grspw_dma_open(void *d, int chan_no)
struct grspw_dma_priv *dma;
int size;
- if ((chan_no < 0) && (priv->hwsup.ndma_chans <= chan_no))
+ if ((chan_no < 0) || (priv->hwsup.ndma_chans <= chan_no))
return NULL;
dma = &priv->dma[chan_no];