From patchwork Tue Jul 30 12:59:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 2835628 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DF32D9F9CE for ; Tue, 30 Jul 2013 12:59:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BBE292012B for ; Tue, 30 Jul 2013 12:59:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1B4F2014A for ; Tue, 30 Jul 2013 12:59:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751500Ab3G3M7a (ORCPT ); Tue, 30 Jul 2013 08:59:30 -0400 Received: from mail-la0-f49.google.com ([209.85.215.49]:59559 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917Ab3G3M73 (ORCPT ); Tue, 30 Jul 2013 08:59:29 -0400 Received: by mail-la0-f49.google.com with SMTP id ev20so1751983lab.22 for ; Tue, 30 Jul 2013 05:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=IBYE5BWP9bA0qArOKSnZZ44xbj0OUSI8Mrjj9qY6LMo=; b=Y9kYFf/UEiTmz8cbjh/P/KGCwhi8avZmxfiUi1wzIHhoKIb0KgYtqukbhMTkFnj9pU +Hbv290/EpE+P0c9NzHCgPJcXJMhZncRIQ5JOzUtmhpqM65LCWHckdVYl/cp9hwr0GsH KyGulLHXCV12vqQ0CG0mk01UsVdQWFmzoHY0PRnYtFrp2wlRGlnIEdE+kqf5qRLK4Xva eS6Joic+A0fBTmM8ZHJVFXKFPt1Zxn8pQ4h/OrKOeILxXivAJUNhxw/op3BYh2a884sC EiuQB0HIn9vpklk0+vxt0vByZf+EE5ObgXz1b7TpSOIyXrasaAqJk8EPkHI+72+tcUyf Wz/g== X-Received: by 10.152.27.9 with SMTP id p9mr29087777lag.4.1375189168382; Tue, 30 Jul 2013 05:59:28 -0700 (PDT) Received: from localhost (0x4dd4aed9.adsl.cybercity.dk. [77.212.174.217]) by mx.google.com with ESMTPSA id db5sm1196978lac.10.2013.07.30.05.59.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 30 Jul 2013 05:59:27 -0700 (PDT) From: Ricardo Ribalda Delgado To: hans.verkuil@cisco.com, linux-media@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH] v4l2_compliance: -EINVAL is expected when ret is not 0 Date: Tue, 30 Jul 2013 14:59:23 +0200 Message-Id: <1375189163-32510-1-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Otherwise the driver can never return a register Signed-off-by: Ricardo Ribalda Delgado --- utils/v4l2-compliance/v4l2-test-debug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/v4l2-compliance/v4l2-test-debug.cpp b/utils/v4l2-compliance/v4l2-test-debug.cpp index 90c5b90..fa42d2c 100644 --- a/utils/v4l2-compliance/v4l2-test-debug.cpp +++ b/utils/v4l2-compliance/v4l2-test-debug.cpp @@ -49,7 +49,7 @@ int testRegister(struct node *node) return ret; // Not allowed to call VIDIOC_DBG_G_REGISTER unless root fail_on_test(uid && ret != EPERM); - fail_on_test(uid == 0 && ret != EINVAL); + fail_on_test(uid == 0 && ret && ret != EINVAL); fail_on_test(uid == 0 && !ret && reg.size == 0); chip.match.type = V4L2_CHIP_MATCH_BRIDGE; chip.match.addr = 0;