From patchwork Mon Jul 5 10:12:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 110202 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o65ACmmB001127 for ; Mon, 5 Jul 2010 10:12:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754435Ab0GEKMq (ORCPT ); Mon, 5 Jul 2010 06:12:46 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:45312 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754272Ab0GEKMp (ORCPT ); Mon, 5 Jul 2010 06:12:45 -0400 Received: by pxi14 with SMTP id 14so1625385pxi.19 for ; Mon, 05 Jul 2010 03:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=NTmHMRiSlAUoZ36fXPyvcoIK+rD38GY/mI913SNzeN8=; b=GX5/d1Vhc3k2oaJg6Yu811EDa/Aqxg8VJQXAfznMdUn0SlSFc9UdYk8abwdRrawnDZ wujv27WOtHo2PB9uc373PKhSe1IIlrMypjG773w8jHj910ptgLus+HBtJsgTSNxoM1Ti Mx7DBrbVT1v98zZ+6ldRtpzPIQ915tS0Ty5Sc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=ewP9jk2jo2Ew5uKRiSpZurB+wg3U5XirF4cNbV4GOw3lxZvCOwXr36M6Q9qEosL8MD SWSE7rGoNH3QwsvZluX1uRQ1Q9Y1LN4Hi875xfqCvOKN4VuvBJ+in/TLBz79HJ8LipGq tw+41Md2kG88n1L1VLwqjbZWtgFsFs+dQmJ9k= Received: by 10.114.59.15 with SMTP id h15mr2884068waa.209.1278324764203; Mon, 05 Jul 2010 03:12:44 -0700 (PDT) Received: from [127.0.0.1] (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id s5sm61945183wak.12.2010.07.05.03.12.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Jul 2010 03:12:43 -0700 (PDT) From: Magnus Damm To: g.liakhovetski@gmx.de Cc: Magnus Damm , linux-media@vger.kernel.org Date: Mon, 05 Jul 2010 19:12:59 +0900 Message-Id: <20100705101259.23155.79936.sendpatchset@t400s> Subject: [PATCH] V4L/DVB: soc-camera: module_put() fix 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]); Mon, 05 Jul 2010 10:12:51 +0000 (UTC) --- 0001/drivers/media/video/soc_camera.c +++ work/drivers/media/video/soc_camera.c 2010-06-23 13:43:05.000000000 +0900 @@ -1034,7 +1034,8 @@ eiufmt: soc_camera_free_i2c(icd); } else { icl->del_device(icl); - module_put(control->driver->owner); + if (control && control->driver && control->driver->owner) + module_put(control->driver->owner); } enodrv: eadddev: