drm: Small logic fix in drm_mode_setcrtc
authorJakob Bornecrantz <jakob@vmware.com>
Mon, 3 Aug 2009 12:43:58 +0000 (13:43 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 4 Aug 2009 03:29:27 +0000 (13:29 +1000)
Match the logic to the comments in the debug message

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c

index 8fab7890a363e6109a540bf5a98b08e9dae8fd1d..33be210d6723564fd9cf9052b117f2c455cf9073 100644 (file)
@@ -1461,7 +1461,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
                goto out;
        }
 
-       if (crtc_req->count_connectors > 0 && !mode && !fb) {
+       if (crtc_req->count_connectors > 0 && (!mode || !fb)) {
                DRM_DEBUG("Count connectors is %d but no mode or fb set\n",
                          crtc_req->count_connectors);
                ret = -EINVAL;