aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/xdma/xdma_sg.c
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2019-08-30 00:40:08 +0000
committerEd Maste <emaste@FreeBSD.org>2019-08-30 00:40:08 +0000
commitd676fedfbcec903620dbcd9bdffe8954c5238da3 (patch)
tree0f1735a7e454ab1f41266f8979d0dc9d235b1899 /sys/dev/xdma/xdma_sg.c
parent7e0025dea29f87d65d2d47875d819e49f366c7ff (diff)
downloadsrc-d676fedfbcec903620dbcd9bdffe8954c5238da3.tar.gz
src-d676fedfbcec903620dbcd9bdffe8954c5238da3.zip
xdma: avoid NULL deref in error case
Reported by: Dr Silvio Cesare of InfoSect MFC after: 3 days Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=351621
Diffstat (limited to 'sys/dev/xdma/xdma_sg.c')
-rw-r--r--sys/dev/xdma/xdma_sg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/xdma/xdma_sg.c b/sys/dev/xdma/xdma_sg.c
index d057ff3bb000..b02b7d9d3e94 100644
--- a/sys/dev/xdma/xdma_sg.c
+++ b/sys/dev/xdma/xdma_sg.c
@@ -186,8 +186,7 @@ xchan_bufs_alloc(xdma_channel_t *xchan)
xdma = xchan->xdma;
if (xdma == NULL) {
- device_printf(xdma->dev,
- "%s: Channel was not allocated properly.\n", __func__);
+ printf("%s: Channel was not allocated properly.\n", __func__);
return (-1);
}