From bcccdfa37bad4ddb6b564ec9d17908c0a8ffa321 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Sun, 14 Feb 2016 13:42:16 +0000 Subject: [PATCH] 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] --- sys/dev/xen/blkfront/blkfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c index c193d84b5a2b..d35e04acb0b9 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); }