From patchwork Tue Mar 1 19:28:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 8469621 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6841D9F2F0 for ; Tue, 1 Mar 2016 19:29:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9EF3920357 for ; Tue, 1 Mar 2016 19:29:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB89F20304 for ; Tue, 1 Mar 2016 19:29:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752830AbcCAT3I (ORCPT ); Tue, 1 Mar 2016 14:29:08 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:36162 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752100AbcCAT3H (ORCPT ); Tue, 1 Mar 2016 14:29:07 -0500 Received: by mail-lf0-f52.google.com with SMTP id l83so73078685lfd.3 for ; Tue, 01 Mar 2016 11:29:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=i9FSFFQ7Vg5olLzD8+QDwOnxuCtRjLQj6NXdtBdGHJw=; b=fexdp7WHT/iuKfaEi+Td2QM4E1hvFtoI/RxwpDBVgQVeOeFq5HZ8rMzDrgxvOyaBIb FQikLefKPEqIXtI1jnV0ML8qPi5isHP9gjXWSC4oRdNTtOgxsyVLRIsN97MKAnKJuJjr U60jW3fMtl2RbL0J/4c7KXo/mrfG1gyT92WEwE57nhUlsJXgCH9dxQ9TP4jV37rFcoht fjkOXKGuoy0RcgPrhnuWQEXVhSj7PNjkFRX2C1/Zee3MV02A+qSQZymUgdRG+bVrYAM0 ap/GGgZZuYtPdlXl0/655GtdQSLG7e046RdGB+cUZkxlodhTzOFgXs4nhme0jM/zag3K 2rnQ== X-Gm-Message-State: AD7BkJJpt3JkwdRjk8x/EqfFQ82RPfyBdfBUjvAbzEUFlIgXbRvyCj6uw0bqX/8dkRIr3A== X-Received: by 10.25.146.145 with SMTP id u139mr8754447lfd.113.1456860545276; Tue, 01 Mar 2016 11:29:05 -0800 (PST) Received: from dl160.lan (87-93-106-106.bb.dnainternet.fi. [87.93.106.106]) by smtp.gmail.com with ESMTPSA id m73sm306178lfm.37.2016.03.01.11.29.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Mar 2016 11:29:04 -0800 (PST) From: Olli Salonen To: linux-media@vger.kernel.org Cc: torbjorn.jansson@mbox200.swipnet.se, mchehab@osg.samsung.com, Olli Salonen Subject: [PATCH] dvb-core: fix return code checking for devices with CA Date: Tue, 1 Mar 2016 21:28:54 +0200 Message-Id: <1456860534-1386-1-git-send-email-olli.salonen@iki.fi> X-Mailer: git-send-email 1.9.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 The test for the return code was mistakenly inverted. This caused DVB devices with CA module to fail on modprobe. Tested with TechnoTrend CT2-4650 CI USB tuner. Signed-off-by: Olli Salonen --- drivers/media/dvb-core/dvbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 1b9732e..e1684c5 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -681,7 +681,7 @@ int dvb_create_media_graph(struct dvb_adapter *adap, if (demux && ca) { ret = media_create_pad_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED); - if (!ret) + if (ret) return -ENOMEM; }