From patchwork Thu Sep 6 15:23:54 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: 1415961 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 7426640220 for ; Thu, 6 Sep 2012 15:26:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758328Ab2IFP02 (ORCPT ); Thu, 6 Sep 2012 11:26:28 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:33245 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757793Ab2IFPYR (ORCPT ); Thu, 6 Sep 2012 11:24:17 -0400 Received: by wibhr14 with SMTP id hr14so1620841wib.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=9vaAfrr0fgJmFSKGkRz19RZ0bZxNiKXYVq3/za941Tg=; b=lQAA+f7jikg+nmQWN6I141jy2CPX6zchngVA6/5LS5vfVsEHFoCJvT1FVO5knwKC0Y tYb6AQrcNCFXJ7w6hr+2NHqhErCg/lI4WZyaRZm2kSBE2fFzzq0TirYzgbRQg85jiafj M/jZCRSpGx2S+ydvlz/peYxmvfCoj2XItLnLVYT/0Og2KGbw9TXqrdkk1UNyDOiCwnmO pYF8tLlaSf+ZFXKj6Ac3SZ86ueVLCdpPZoSA4chHETFPp5G9GiZQSe5SHnT8Pl5diBjD pmaEKbsV3Hc6sQyPqH0dyudqUBbLkODlfMho5q9vanBddkhm+WhqgyWW8C3rj7mw0tSi aCAA== Received: by 10.216.138.92 with SMTP id z70mr1405473wei.68.1346945055638; 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.15 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 08:24:15 -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 7/14] drivers/media/pci/ngene/ngene-core.c: fix error return code Date: Thu, 6 Sep 2012 17:23:54 +0200 Message-Id: <1346945041-26676-7-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/ngene/ngene-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 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/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c index c8e0d5b..6bb44f1 100644 --- a/drivers/media/pci/ngene/ngene-core.c +++ b/drivers/media/pci/ngene/ngene-core.c @@ -1691,7 +1691,8 @@ int __devinit ngene_probe(struct pci_dev *pci_dev, dev->i2c_current_bus = -1; /* Register DVB adapters and devices for both channels */ - if (init_channels(dev) < 0) + stat = init_channels(dev); + if (stat < 0) goto fail2; return 0;