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]
This commit is contained in:
parent
9e3e4b8857
commit
bc9b18cea2
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user