diff options
Diffstat (limited to 'drivers/char/drm/via_video.c')
-rw-r--r-- | drivers/char/drm/via_video.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/drm/via_video.c b/drivers/char/drm/via_video.c index 7fab9fbdf424..300ac61b09ed 100644 --- a/drivers/char/drm/via_video.c +++ b/drivers/char/drm/via_video.c | |||
@@ -50,8 +50,11 @@ void via_release_futex(drm_via_private_t * dev_priv, int context) | |||
50 | unsigned int i; | 50 | unsigned int i; |
51 | volatile int *lock; | 51 | volatile int *lock; |
52 | 52 | ||
53 | if (!dev_priv->sarea_priv) | ||
54 | return; | ||
55 | |||
53 | for (i = 0; i < VIA_NR_XVMC_LOCKS; ++i) { | 56 | for (i = 0; i < VIA_NR_XVMC_LOCKS; ++i) { |
54 | lock = (int *)XVMCLOCKPTR(dev_priv->sarea_priv, i); | 57 | lock = (volatile int *)XVMCLOCKPTR(dev_priv->sarea_priv, i); |
55 | if ((_DRM_LOCKING_CONTEXT(*lock) == context)) { | 58 | if ((_DRM_LOCKING_CONTEXT(*lock) == context)) { |
56 | if (_DRM_LOCK_IS_HELD(*lock) | 59 | if (_DRM_LOCK_IS_HELD(*lock) |
57 | && (*lock & _DRM_LOCK_CONT)) { | 60 | && (*lock & _DRM_LOCK_CONT)) { |
@@ -79,7 +82,7 @@ int via_decoder_futex(DRM_IOCTL_ARGS) | |||
79 | if (fx.lock > VIA_NR_XVMC_LOCKS) | 82 | if (fx.lock > VIA_NR_XVMC_LOCKS) |
80 | return -EFAULT; | 83 | return -EFAULT; |
81 | 84 | ||
82 | lock = (int *)XVMCLOCKPTR(sAPriv, fx.lock); | 85 | lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx.lock); |
83 | 86 | ||
84 | switch (fx.func) { | 87 | switch (fx.func) { |
85 | case VIA_FUTEX_WAIT: | 88 | case VIA_FUTEX_WAIT: |