Message ID | 20161222031708.18752-33-benh@kernel.crashing.org |
---|---|
State | Accepted |
Headers | show |
diff --git a/hw/xive.c b/hw/xive.c index 2a0d234..5476a97 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -761,7 +761,8 @@ static struct xive_vp *xive_get_vp(struct xive *x, unsigned int idx) assert(idx < (x->vp_ind_count * VP_PER_PAGE)); p = (struct xive_vp *)(x->vp_ind_base[idx / VP_PER_PAGE] & VSD_ADDRESS_MASK); - assert(p); + if (!p) + return NULL; return &p[idx % VP_PER_PAGE]; #else
Just return NULL to the caller Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> --- hw/xive.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)