From patchwork Sat Jun 5 12:05:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 3612 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Sat, 05 Jun 2010 12:06:18 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Sun, 06 Jun 2010 02:47:32 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1OKs8o-0003hD-7q; Sat, 05 Jun 2010 12:06:18 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932992Ab0FEMGQ (ORCPT + 1 other); Sat, 5 Jun 2010 08:06:16 -0400 Received: from mail-ew0-f223.google.com ([209.85.219.223]:36079 "EHLO mail-ew0-f223.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755687Ab0FEMGP (ORCPT ); Sat, 5 Jun 2010 08:06:15 -0400 Received: by ewy23 with SMTP id 23so15329ewy.1 for ; Sat, 05 Jun 2010 05:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=QVcUItlBah+38K+4NHKR5/J+kJHcN4aV/EPjdZcghm8=; b=h9Xc5DkiMlHFvPPXp6e/kasJeQOMj3QENU2ITRrWWZPsWIFb1abXp9YD4tcWzHPE0L 04cwXypSr1kfBP1mdXBDkqf7Fzv2fcS2glCI3V/eTChaobFiNXIhkeGryb2wnYuMpZ7Y DZS4UQPG2JEC0o75t2bSFJM3Hmrf3DtLaByB0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=LnG5j3DUYC6KWoiRVuA0I3t4jbTazAav5h458ROYQuwk3E1r/GzNTGj+kt5JqOTk1A Iwqrj9dKVSKk1+v7La0AXthHansuPusH4HboVMFWeM4pfbIyiiDScPQh10ZwVnIe/Jjh 1KFoBeoUblb0SJC5N4/pexBmi8FsKmgQRjeN8= Received: by 10.213.29.65 with SMTP id p1mr8113101ebc.60.1275739573612; Sat, 05 Jun 2010 05:06:13 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 15sm1313919ewy.0.2010.06.05.05.06.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Jun 2010 05:06:12 -0700 (PDT) Date: Sat, 5 Jun 2010 14:05:29 +0200 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Michael Krufky , "Igor M. Liplianin" , Abylay Ospan , Steven Toth , linux-media@vger.kernel.org Subject: [patch] V4L/DVB: cx23885: reversed condition in dvb_register() Message-ID: <20100605120529.GK5483@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org videobuf_dvb_register_bus() returns negative error codes on failure. This was introduced in e4425eab6b2: "V4L/DVB: cx23885: Check register errors". Signed-off-by: Dan Carpenter --- I don't have the hardware to test this, but it looks reversed. -- 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/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index 0a199d7..bf7c328 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c @@ -991,7 +991,7 @@ static int dvb_register(struct cx23885_tsport *port) ret = videobuf_dvb_register_bus(&port->frontends, THIS_MODULE, port, &dev->pci->dev, adapter_nr, 0, cx23885_dvb_fe_ioctl_override); - if (!ret) + if (ret < 0) return ret; /* init CI & MAC */