summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2018-01-09 14:23:03 +0000
committerjsg <jsg@openbsd.org>2018-01-09 14:23:03 +0000
commit522ac3065e624a35d57cc959bae3fc1ff68c8339 (patch)
tree50c4f1eed631b5679252356545f172d4bf942807
parentWork around a problem with ww_mutexes in the drm modeset lock. (diff)
downloadwireguard-openbsd-522ac3065e624a35d57cc959bae3fc1ff68c8339.tar.xz
wireguard-openbsd-522ac3065e624a35d57cc959bae3fc1ff68c8339.zip
lock->ctx != NULL => lock->ctx
requested by kettenis@
-rw-r--r--sys/dev/pci/drm/linux_ww_mutex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/linux_ww_mutex.h b/sys/dev/pci/drm/linux_ww_mutex.h
index fb1b26791f6..4476af7830b 100644
--- a/sys/dev/pci/drm/linux_ww_mutex.h
+++ b/sys/dev/pci/drm/linux_ww_mutex.h
@@ -164,7 +164,7 @@ __ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx, bool slow, bo
* resources.
*/
if (slow || ctx == NULL ||
- (lock->ctx != NULL && ctx->stamp < lock->ctx->stamp)) {
+ (lock->ctx && ctx->stamp < lock->ctx->stamp)) {
int s = msleep(lock, &lock->lock,
intr ? PCATCH : 0,
ctx ? ctx->ww_class->name : "ww_mutex_lock", 0);