summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2013-04-04 21:26:19 +0000
committerkettenis <kettenis@openbsd.org>2013-04-04 21:26:19 +0000
commita1a328491cd7daaae3158ee5f2e2549adf5b8929 (patch)
treec4115b2ef419df2008be7862ddd059f40b43d60a
parentMerge the duplicate IPv4 and IPv6 checksum checking code in udp_input() (diff)
downloadwireguard-openbsd-a1a328491cd7daaae3158ee5f2e2549adf5b8929.tar.xz
wireguard-openbsd-a1a328491cd7daaae3158ee5f2e2549adf5b8929.zip
The intel_dp_i2c_aux_ch() function has to return Linux-style negative errno
values. Its callers assume a positive return value means the function was successful.
-rw-r--r--sys/dev/pci/drm/i915/intel_dp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/pci/drm/i915/intel_dp.c b/sys/dev/pci/drm/i915/intel_dp.c
index 2997dd6e369..51eaa071254 100644
--- a/sys/dev/pci/drm/i915/intel_dp.c
+++ b/sys/dev/pci/drm/i915/intel_dp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_dp.c,v 1.2 2013/04/03 05:29:06 jsg Exp $ */
+/* $OpenBSD: intel_dp.c,v 1.3 2013/04/04 21:26:19 kettenis Exp $ */
/*
* Copyright © 2008 Intel Corporation
*
@@ -753,14 +753,14 @@ intel_dp_i2c_aux_ch(struct i2c_controller *adapter, int mode,
break;
case AUX_NATIVE_REPLY_NACK:
DRM_DEBUG_KMS("aux_ch native nack\n");
- return EIO;
+ return -EIO;
case AUX_NATIVE_REPLY_DEFER:
DELAY(100);
continue;
default:
DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
reply[0]);
- return EIO;
+ return -EIO;
}
switch (reply[0] & AUX_I2C_REPLY_MASK) {
@@ -771,19 +771,19 @@ intel_dp_i2c_aux_ch(struct i2c_controller *adapter, int mode,
return reply_bytes - 1;
case AUX_I2C_REPLY_NACK:
DRM_DEBUG_KMS("aux_i2c nack\n");
- return EIO;
+ return -EIO;
case AUX_I2C_REPLY_DEFER:
DRM_DEBUG_KMS("aux_i2c defer\n");
DELAY(100);
break;
default:
DRM_ERROR("aux_i2c invalid reply 0x%02x\n", reply[0]);
- return EIO;
+ return -EIO;
}
}
DRM_ERROR("too many retries, giving up\n");
- return EIO;
+ return -EIO;
}
int