aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2016-02-14 13:42:16 +0000
committerColin Percival <cperciva@FreeBSD.org>2016-02-14 13:42:16 +0000
commitbcccdfa37bad4ddb6b564ec9d17908c0a8ffa321 (patch)
tree80084f0d4e13ba6778f822effcc64152cb146d87
parent8cb15594b3041324e82a47d109a56d43e0d8ea1a (diff)
downloadsrc-bcccdfa37bad4ddb6b564ec9d17908c0a8ffa321.tar.gz
src-bcccdfa37bad4ddb6b564ec9d17908c0a8ffa321.zip
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]
Notes
Notes: svn path=/head/; revision=295609
-rw-r--r--sys/dev/xen/blkfront/blkfront.c2
1 files changed, 1 insertions, 1 deletions
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);
}