diff options
| author | dyoung <dyoung@NetBSD.org> | 2009-04-02 01:06:49 +0000 |
|---|---|---|
| committer | dyoung <dyoung@NetBSD.org> | 2009-04-02 01:06:49 +0000 |
| commit | 30156f20e6eca96d26192f4d70848cdca9a317e4 (patch) | |
| tree | a4b078ed9d3ec6541f1075073e9dc1d9043136c0 /sys/dev | |
| parent | b783d8bd8cc54a058ae59298d25fe09f35dde1b6 (diff) | |
Cosmetic changes, only, to clarify and to save a couple of lines: return
a constant, 0, instead of returning ret when it is always 0. Wait to
initialize ret until we really need to.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/azalia.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index 4fd7a879dea..cabaf72ff86 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $NetBSD: azalia.c,v 1.67 2009/02/25 15:46:34 jmcneill Exp $ */ +/* $NetBSD: azalia.c,v 1.68 2009/04/02 01:06:49 dyoung Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.67 2009/02/25 15:46:34 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.68 2009/04/02 01:06:49 dyoung Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -459,17 +459,15 @@ azalia_intr(void *v) uint8_t rirbsts; az = v; - ret = 0; if (!device_has_power(az->dev)) return 0; - intsts = AZ_READ_4(az, INTSTS); - if (intsts == 0) - return ret; + if ((intsts = AZ_READ_4(az, INTSTS)) == 0) + return 0; - ret += azalia_stream_intr(&az->pstream, intsts); - ret += azalia_stream_intr(&az->rstream, intsts); + ret = azalia_stream_intr(&az->pstream, intsts) + + azalia_stream_intr(&az->rstream, intsts); rirbsts = AZ_READ_1(az, RIRBSTS); if (rirbsts & (HDA_RIRBSTS_RIRBOIS | HDA_RIRBSTS_RINTFL)) { |
