summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-04-11 14:49:31 +0300
committerToomas Soome <tsoome@me.com>2020-05-11 09:01:56 +0300
commit4e2c3273e98e347b3b0d6ea03be57eda0b8def7b (patch)
treef380eb865ae0c914325a8a4dfd38c13e4744c782
parent4f82e07802416dd88f61770ddd96e9c040095895 (diff)
downloadillumos-joyent-4e2c3273e98e347b3b0d6ea03be57eda0b8def7b.tar.gz
12543 chxge: NULL pointer errors
Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Patrick Mooney <pmooney@pfmooney.com> Reviewed by: Jorge Schrauwen <registration@blackdot.be> Approved by: Garrett D'Amore <garrett@damore.org>
-rw-r--r--usr/src/uts/common/io/chxge/pe.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/uts/common/io/chxge/pe.c b/usr/src/uts/common/io/chxge/pe.c
index 652edba984..48a796470a 100644
--- a/usr/src/uts/common/io/chxge/pe.c
+++ b/usr/src/uts/common/io/chxge/pe.c
@@ -414,12 +414,12 @@ pe_start(ch_t *sa, mblk_t *mp, uint32_t flg)
lseg = ch_bind_dvma_handle(sa, len,
(void *)mp->b_rptr,
&hmp[nseg], mseg - nseg);
- if (lseg == NULL) {
+ if (lseg == 0) {
sa->sge->intr_cnt.tx_no_dvma1++;
if ((lseg = ch_bind_dma_handle(sa, len,
(void *)mp->b_rptr,
&hmp[nseg],
- mseg - nseg)) == NULL) {
+ mseg - nseg)) == 0) {
sa->sge->intr_cnt.tx_no_dma1++;
/*
@@ -444,7 +444,7 @@ pe_start(ch_t *sa, mblk_t *mp, uint32_t flg)
lseg = ch_bind_dma_handle(sa, len,
(void *)mp->b_rptr, &hmp[nseg],
mseg - nseg);
- if (lseg == NULL) {
+ if (lseg == 0) {
sa->sge->intr_cnt.tx_no_dma1++;
/*
@@ -512,12 +512,12 @@ pe_start(ch_t *sa, mblk_t *mp, uint32_t flg)
nseg = ch_bind_dvma_handle(sa, len,
(void *)mp->b_rptr,
&hmp[0], 16);
- if (nseg == NULL) {
+ if (nseg == 0) {
sa->sge->intr_cnt.tx_no_dvma2++;
nseg = ch_bind_dma_handle(sa, len,
(void *)mp->b_rptr,
&hmp[0], 16);
- if (nseg == NULL) {
+ if (nseg == 0) {
sa->sge->intr_cnt.tx_no_dma2++;
/*
@@ -530,7 +530,7 @@ pe_start(ch_t *sa, mblk_t *mp, uint32_t flg)
} else {
nseg = ch_bind_dma_handle(sa, len,
(void *)mp->b_rptr, &hmp[0], 16);
- if (nseg == NULL) {
+ if (nseg == 0) {
sa->sge->intr_cnt.tx_no_dma2++;
/*