From patchwork Sun Sep 26 14:25:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 209982 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 o8QEQFs0032341 for ; Sun, 26 Sep 2010 14:26:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756764Ab0IZO0L (ORCPT ); Sun, 26 Sep 2010 10:26:11 -0400 Received: from zone0.gcu-squad.org ([212.85.147.21]:35177 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753106Ab0IZO0L (ORCPT ); Sun, 26 Sep 2010 10:26:11 -0400 Received: from jdelvare.pck.nerim.net ([62.212.121.182] helo=endymion.delvare) by services.gcu-squad.org (GCU Mailer Daemon) with esmtpsa id 1OzsAp-0007vU-1t (TLSv1:AES128-SHA:128) (envelope-from ) ; Sun, 26 Sep 2010 16:25:51 +0200 Date: Sun, 26 Sep 2010 16:25:53 +0200 From: Jean Delvare To: LMML Cc: Mauro Carvalho Chehab Subject: [PATCH] V4L/DVB: dib0700: Prevent NULL pointer dereference during probe Message-ID: <20100926162553.660281c6@endymion.delvare> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.20.1; x86_64-unknown-linux-gnu) Mime-Version: 1.0 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.3 (demeter1.kernel.org [140.211.167.41]); Sun, 26 Sep 2010 14:26:15 +0000 (UTC) --- linux-2.6.36-rc5.orig/drivers/media/dvb/dvb-usb/dib0700_core.c 2010-09-24 17:17:16.000000000 +0200 +++ linux-2.6.36-rc5/drivers/media/dvb/dvb-usb/dib0700_core.c 2010-09-26 15:04:59.000000000 +0200 @@ -674,7 +674,8 @@ static int dib0700_probe(struct usb_inte dev->props.rc.core.bulk_mode = false; /* Need a higher delay, to avoid wrong repeat */ - dev->rc_input_dev->rep[REP_DELAY] = 500; + if (dev->rc_input_dev) + dev->rc_input_dev->rep[REP_DELAY] = 500; dib0700_rc_setup(dev);