svn commit: r258219 - stable/9/sys/dev/ata/chipsets
Alexander Motin
mav at FreeBSD.org
Sat Nov 16 10:49:03 UTC 2013
Author: mav
Date: Sat Nov 16 10:49:02 2013
New Revision: 258219
URL: http://svnweb.freebsd.org/changeset/base/258219
Log:
MFC r253644:
Add missing NULL check after malloc(M_NOWAIT).
Modified:
stable/9/sys/dev/ata/chipsets/ata-promise.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/ata/chipsets/ata-promise.c
==============================================================================
--- stable/9/sys/dev/ata/chipsets/ata-promise.c Sat Nov 16 10:47:58 2013 (r258218)
+++ stable/9/sys/dev/ata/chipsets/ata-promise.c Sat Nov 16 10:49:02 2013 (r258219)
@@ -288,6 +288,10 @@ ata_promise_chipinit(device_t dev)
/* setup host packet controls */
hpkt = malloc(sizeof(struct ata_promise_sx4),
M_ATAPCI, M_NOWAIT | M_ZERO);
+ if (hpkt == NULL) {
+ device_printf(dev, "Cannot allocate HPKT\n");
+ goto failnfree;
+ }
mtx_init(&hpkt->mtx, "ATA promise HPKT lock", NULL, MTX_DEF);
TAILQ_INIT(&hpkt->queue);
hpkt->busy = 0;
More information about the svn-src-stable-9
mailing list