diff options
author | cperciva <cperciva@FreeBSD.org> | 2016-02-14 13:42:16 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2016-02-14 13:42:16 +0000 |
commit | bc9b18cea2385ac27eaffb6d0bcc79725b4949e8 (patch) | |
tree | 80084f0d4e13ba6778f822effcc64152cb146d87 /sys/dev | |
parent | 9e3e4b88576d01efe1f56469cac79e116bb62c67 (diff) | |
download | FreeBSD-src-bc9b18cea2385ac27eaffb6d0bcc79725b4949e8.zip FreeBSD-src-bc9b18cea2385ac27eaffb6d0bcc79725b4949e8.tar.gz |
Don't dereference a pointer immediately after determining that it is
equal to NULL. [1]
While I'm here, s/xb/xbd/ (the name changed a long time ago but this
instance wasn't corrected).
Reported by: PVS-Studio [1]
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/xen/blkfront/blkfront.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c index c193d84..d35e04a 100644 --- a/sys/dev/xen/blkfront/blkfront.c +++ b/sys/dev/xen/blkfront/blkfront.c @@ -674,7 +674,7 @@ xbd_open(struct disk *dp) struct xbd_softc *sc = dp->d_drv1; if (sc == NULL) { - printf("xb%d: not found", sc->xbd_unit); + printf("xbd%d: not found", dp->d_unit); return (ENXIO); } |