From patchwork Thu Sep 6 15:23:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Senna Tschudin X-Patchwork-Id: 1415801 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A9DCC40220 for ; Thu, 6 Sep 2012 15:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757855Ab2IFPYS (ORCPT ); Thu, 6 Sep 2012 11:24:18 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:43127 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757743Ab2IFPYQ (ORCPT ); Thu, 6 Sep 2012 11:24:16 -0400 Received: by mail-wi0-f172.google.com with SMTP id hi8so567449wib.1 for ; Thu, 06 Sep 2012 08:24:15 -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=dbwcBMHZyAJNVXP7ftq4hdv1U2renrFqT0P803qR34M=; b=T1jk4AEjQioFAORT4UXasHrcWiKTM7x9kqxu14cd3SYcu9PclCI1rlai3ee2eO9AFn n8ZHjxcBlBi+hfLDZ5OQhkJfK3/TdySGAwjaXtUuM5zEV3zGMoQv/UNPvQDvmzQ6KviC 8392xm7xRxyQi2M4tuUZs2Yx8DuH2xPoM4Fr+5jfl3qVZAXWQUQfV6xfLiuDi/6MK84V Hi+g7xydBy+ZZuhtw6tukONfFtdvElJq254QVLTuTUm21k1FpXDaEryZGMg7fCobcq6g L/VijYVTBM5g1YN0aabDj5FMJ2ojJAvBOtTT6RbEfHVfyg1yzslvxYtFeyjcUZPdghFc cbQw== Received: by 10.216.242.204 with SMTP id i54mr1518072wer.114.1346945055074; Thu, 06 Sep 2012 08:24:15 -0700 (PDT) Received: from localhost.localdomain ([132.227.100.38]) by mx.google.com with ESMTPS id el6sm4572331wib.8.2012.09.06.08.24.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 08:24:14 -0700 (PDT) From: Peter Senna Tschudin To: Mauro Carvalho Chehab Cc: kernel-janitors@vger.kernel.org, Julia.Lawall@lip6.fr, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/14] drivers/media/pci/ttpci/budget-av.c: fix error return code Date: Thu, 6 Sep 2012 17:23:53 +0200 Message-Id: <1346945041-26676-6-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.7.11.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Peter Senna Tschudin Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Peter Senna Tschudin --- drivers/media/pci/ttpci/budget-av.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c index 12ddb53..1f8b1bb 100644 --- a/drivers/media/pci/ttpci/budget-av.c +++ b/drivers/media/pci/ttpci/budget-av.c @@ -1477,8 +1477,8 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio if (saa7113_init(budget_av) == 0) { budget_av->has_saa7113 = 1; - - if (0 != saa7146_vv_init(dev, &vv_data)) { + err = saa7146_vv_init(dev, &vv_data); + if (err != 0) { /* fixme: proper cleanup here */ ERR("cannot init vv subsystem\n"); return err;