Mark Kettenis <[email protected]> writes:

> Another obvious mistake caught by clang.
>
> ok?

ok jca@

>
> Index: dev/pv/hyperv.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pv/hyperv.c,v
> retrieving revision 1.16
> diff -u -p -r1.16 hyperv.c
> --- dev/pv/hyperv.c   20 Sep 2016 10:27:14 -0000      1.16
> +++ dev/pv/hyperv.c   24 Sep 2016 17:04:24 -0000
> @@ -700,7 +700,7 @@ hv_vmbus_connect(struct hv_softc *sc)
>       sc->sc_revents = (u_long *)((caddr_t)sc->sc_events + (PAGE_SIZE >> 1));
>  
>       sc->sc_monitor[0] = km_alloc(PAGE_SIZE, &kv_any, &kp_zero, &kd_nowait);
> -     if (sc->sc_monitor == NULL) {
> +     if (sc->sc_monitor[0] == NULL) {
>               printf(": failed to allocate monitor page 1\n");
>               goto errout;
>       }
> @@ -710,7 +710,7 @@ hv_vmbus_connect(struct hv_softc *sc)
>       }
>  
>       sc->sc_monitor[1] = km_alloc(PAGE_SIZE, &kv_any, &kp_zero, &kd_nowait);
> -     if (sc->sc_monitor == NULL) {
> +     if (sc->sc_monitor[1] == NULL) {
>               printf(": failed to allocate monitor page 2\n");
>               goto errout;
>       }
>


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to