xdma: avoid NULL deref in error case

Reported by:	Dr Silvio Cesare of InfoSect
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2019-08-30 00:40:08 +00:00
parent 7e0025dea2
commit d676fedfbc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=351621

View File

@ -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);
}