From patchwork Tue Mar 23 06:22:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 87571 X-Patchwork-Delegate: dougsland@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2N6NYbD003250 for ; Tue, 23 Mar 2010 06:23:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753720Ab0CWGWy (ORCPT ); Tue, 23 Mar 2010 02:22:54 -0400 Received: from mgw1.diku.dk ([130.225.96.91]:52960 "EHLO mgw1.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750824Ab0CWGWx (ORCPT ); Tue, 23 Mar 2010 02:22:53 -0400 Received: from localhost (localhost [127.0.0.1]) by mgw1.diku.dk (Postfix) with ESMTP id 30C2552C4F4; Tue, 23 Mar 2010 07:22:52 +0100 (CET) X-Virus-Scanned: amavisd-new at diku.dk Received: from mgw1.diku.dk ([127.0.0.1]) by localhost (mgw1.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7tX73Wqh1zYl; Tue, 23 Mar 2010 07:22:47 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw1.diku.dk (Postfix) with ESMTP id C95EF52C48F; Tue, 23 Mar 2010 07:22:47 +0100 (CET) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id 8652D6DFB75; Tue, 23 Mar 2010 07:16:46 +0100 (CET) Received: by ask.diku.dk (Postfix, from userid 3767) id A8E55200B0; Tue, 23 Mar 2010 07:22:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id 9DFFA200AF; Tue, 23 Mar 2010 07:22:47 +0100 (CET) Date: Tue, 23 Mar 2010 07:22:47 +0100 (CET) From: Julia Lawall To: Andrew Morton Cc: Mark McClelland , Mauro Carvalho Chehab , linux-usb@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] drivers/media/video: avoid NULL dereference In-Reply-To: <20100322231441.b7e33bf9.akpm@linux-foundation.org> Message-ID: References: <20100322231441.b7e33bf9.akpm@linux-foundation.org> 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 (demeter.kernel.org [140.211.167.41]); Tue, 23 Mar 2010 06:23:34 +0000 (UTC) diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index e0bce8d..dd1b1ac 100644 --- a/drivers/media/video/ov511.c +++ b/drivers/media/video/ov511.c @@ -5916,11 +5916,6 @@ ov51x_disconnect(struct usb_interface *intf) mutex_lock(&ov->lock); usb_set_intfdata (intf, NULL); - if (!ov) { - mutex_unlock(&ov->lock); - return; - } - /* Free device number */ ov511_devused &= ~(1 << ov->nr);