drm/i915/gvt: fix return value in mul_force_wake_write
authorChangbin Du <changbin.du@intel.com>
Tue, 27 Dec 2016 05:25:06 +0000 (13:25 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 9 Jan 2017 03:05:56 +0000 (11:05 +0800)
All mmio handlers should return a negetive value for failure, not 1.

Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/handlers.c

index e06d5f3..8cbaf1c 100644 (file)
@@ -220,7 +220,7 @@ static int mul_force_wake_write(struct intel_vgpu *vgpu,
                default:
                        /*should not hit here*/
                        gvt_err("invalid forcewake offset 0x%x\n", offset);
-                       return 1;
+                       return -EINVAL;
                }
        } else {
                ack_reg_offset = FORCEWAKE_ACK_HSW_REG;