From patchwork Sat Mar 26 18:23:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mariusz Kozlowski X-Patchwork-Id: 665971 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2QIORhi004090 for ; Sat, 26 Mar 2011 18:24:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753431Ab1CZSYJ (ORCPT ); Sat, 26 Mar 2011 14:24:09 -0400 Received: from unix.wroclaw.pl ([94.23.28.62]:58859 "EHLO unix.wroclaw.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750949Ab1CZSYI (ORCPT ); Sat, 26 Mar 2011 14:24:08 -0400 Received: from dynamic-78-8-223-146.ssp.dialog.net.pl ([78.8.223.146]:37432 helo=localhost.localdomain) by unix.wroclaw.pl with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Q3Y9Z-0007NQ-9C; Sat, 26 Mar 2011 19:24:01 +0100 From: Mariusz Kozlowski To: Mauro Carvalho Chehab Cc: Patrick Boettcher , Olivier Grenie , Wolfram Sang , =?UTF-8?q?David=20H=C3=A4rdeman?= , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Mariusz Kozlowski Subject: [PATCH] [media] dib0700: fix possible NULL pointer dereference Date: Sat, 26 Mar 2011 19:23:56 +0100 Message-Id: <1301163836-7601-1-git-send-email-mk@lab.zgora.pl> X-Mailer: git-send-email 1.7.0.4 X-SA-Report: SpamAssassin 3.2.5 (2008-06-10) on unix.wroclaw.pl Spam=No score=-1.4 bayes=0.5 autolearn=disabled Spam Tests: * -1.4 ALL_TRUSTED Passed through trusted hosts only via SMTP Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 26 Mar 2011 18:24:28 +0000 (UTC) diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 97af266..b48f1e0 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c @@ -2439,12 +2439,11 @@ static int tfe7090pvr_frontend0_attach(struct dvb_usb_adapter *adap) dib0700_set_i2c_speed(adap->dev, 340); adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_config[0]); - - dib7090_slave_reset(adap->fe); - if (adap->fe == NULL) return -ENODEV; + dib7090_slave_reset(adap->fe); + return 0; }