diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/dev/elroy.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/arch/hppa/dev/elroy.c b/sys/arch/hppa/dev/elroy.c index 21631ad4632..17018417931 100644 --- a/sys/arch/hppa/dev/elroy.c +++ b/sys/arch/hppa/dev/elroy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elroy.c,v 1.8 2010/12/04 17:06:31 miod Exp $ */ +/* $OpenBSD: elroy.c,v 1.9 2011/01/01 15:18:23 kettenis Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -233,9 +233,12 @@ elroy_make_tag(void *v, int bus, int dev, int func) void elroy_decompose_tag(void *v, pcitag_t tag, int *bus, int *dev, int *func) { - *bus = (tag >> 16) & 0xff; - *dev = (tag >> 11) & 0x1f; - *func= (tag >> 8) & 0x07; + if (bus) + *bus = (tag >> 16) & 0xff; + if (dev) + *dev = (tag >> 11) & 0x1f; + if (func) + *func= (tag >> 8) & 0x07; } int |