From patchwork Sun Dec 6 00:53:40 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 65089 X-Patchwork-Delegate: mchehab@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB60rmlt014918 for ; Sun, 6 Dec 2009 00:53:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754398AbZLFAxj (ORCPT ); Sat, 5 Dec 2009 19:53:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754430AbZLFAxj (ORCPT ); Sat, 5 Dec 2009 19:53:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3516 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754306AbZLFAxi (ORCPT ); Sat, 5 Dec 2009 19:53:38 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB60rhY5020293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 5 Dec 2009 19:53:43 -0500 Received: from [172.17.68.9] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB60rehh014267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 5 Dec 2009 19:53:42 -0500 Message-ID: <4B1B0094.6080000@redhat.com> Date: Sat, 05 Dec 2009 22:53:40 -0200 From: Mauro Carvalho Chehab User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Sander Eikelenboom CC: linux-media@vger.kernel.org Subject: Re: [em28xx] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 IP: [] :ir_common:ir_input_free+0x26/0x3e References: <255535957.20091206000510@eikelenboom.it> In-Reply-To: <255535957.20091206000510@eikelenboom.it> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/linux/drivers/media/common/ir-keytable.c b/linux/drivers/media/common/ir-keytable.c --- a/linux/drivers/media/common/ir-keytable.c +++ b/linux/drivers/media/common/ir-keytable.c @@ -427,6 +427,9 @@ void ir_input_free(struct input_dev *dev { struct ir_scancode_table *rc_tab = input_get_drvdata(dev); + if (!rc_tab) + return; + IR_dprintk(1, "Freed keycode table\n"); rc_tab->size = 0;