From patchwork Mon Feb 21 18:20:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hussam Al-Tayeb X-Patchwork-Id: 578101 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 p1LIL7OO003542 for ; Mon, 21 Feb 2011 18:21:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754015Ab1BUSVF (ORCPT ); Mon, 21 Feb 2011 13:21:05 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:41584 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753852Ab1BUSVE (ORCPT ); Mon, 21 Feb 2011 13:21:04 -0500 Received: by wwa36 with SMTP id 36so6380411wwa.1 for ; Mon, 21 Feb 2011 10:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=pase3vOlv4MpqugdSWECado0cU4IRMr/k5EDaqDZtoQ=; b=cxxiiKiMPaaetwdZvLXFJWp20q0TJTxdqMkOreSjo1F9htvmDZI0pZKiS5r2pJZduN O9cvWB1lR1F1KuyK1mCDClx04v3Py7bb+sYvLIW8k6Gs4iSKBzffVn58jSDYkVZWhJAM ZB05OwoNcXdacLR0KTsoqKzhFMyB3uR1lIB+U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=ROddxeqjaBpTH9vJMKO73jH9jxZmLb33KOj3VtPTXWHic7KkSh1Yjdznxu/ZZ4y/WM u/H3k1X8dIoOGgzUdOJUC8/ptWQe3TUhHI8ku5LnR+l0QBzIOZ1fF5FEcUDGU4JA8Cc7 tDroNFDsq7zzj0F1XacuJSQ2vfw81i5W46QAE= Received: by 10.216.178.206 with SMTP id f56mr1426338wem.85.1298312435216; Mon, 21 Feb 2011 10:20:35 -0800 (PST) Received: from [109.110.97.13] ([109.110.97.13]) by mx.google.com with ESMTPS id r38sm2209923weq.47.2011.02.21.10.20.32 (version=SSLv3 cipher=OTHER); Mon, 21 Feb 2011 10:20:34 -0800 (PST) Subject: [PATCH] avoid kernel oops when rmmod saa7134 From: Hussam Al-Tayeb To: linux-media@vger.kernel.org Date: Mon, 21 Feb 2011 20:20:26 +0200 Message-ID: <1298312426.3152.8.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 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]); Mon, 21 Feb 2011 18:21:08 +0000 (UTC) --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -701,7 +701,7 @@ { struct rc_dev *rdev = input_get_drvdata(idev); - rdev->close(rdev); + if (rdev) rdev->close(rdev); } /* class for /sys/class/rc */