From patchwork Thu Aug 16 08:09:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthijs Kooijman X-Patchwork-Id: 1330251 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7602E40210 for ; Thu, 16 Aug 2012 08:09:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756116Ab2HPIJw (ORCPT ); Thu, 16 Aug 2012 04:09:52 -0400 Received: from drsnuggles.stderr.nl ([94.142.244.14]:36603 "EHLO drsnuggles.stderr.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755894Ab2HPIJn (ORCPT ); Thu, 16 Aug 2012 04:09:43 -0400 Received: from login.drsnuggles.stderr.nl ([10.42.0.9] ident=mail) by mail.drsnuggles.stderr.nl with smtp (Exim 4.69) (envelope-from ) id 1T1v92-0005UK-OP; Thu, 16 Aug 2012 10:09:33 +0200 Received: (nullmailer pid 21098 invoked by uid 1000); Thu, 16 Aug 2012 08:09:32 -0000 Date: Thu, 16 Aug 2012 10:09:32 +0200 From: Matthijs Kooijman To: linux-media@vger.kernel.org Cc: Luis Henriques , Jarod Wilson Subject: Re: (still) NULL pointer crashes with nuvoton_cir driver Message-ID: <20120816080932.GP21274@login.drsnuggles.stderr.nl> Mail-Followup-To: Matthijs Kooijman , linux-media@vger.kernel.org, Luis Henriques , Jarod Wilson References: <20120815165153.GJ21274@login.drsnuggles.stderr.nl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120815165153.GJ21274@login.drsnuggles.stderr.nl> X-PGP-Fingerprint: 7F6A 9F44 2820 18E2 18DE 24AA CF49 D0E6 8A2F AFBC X-PGP-Key: http://www.stderr.nl/static/files/gpg_pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -2.6 (--) X-Spam-Report: Spamchecked on "mail.drsnuggles.stderr.nl" pts rule name description ---- ---------------------- ------------------------------------------- -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi folks, > I'm currently compiling a 3.5 kernel with just the rdev initialization > moved up to see if this will fix my problem at all, but I'd like your > view on this in the meantime as well. Ok, this seems to fix my problem: I'm still not sure if the rc_register_device shouldn't also be moved up. It seems this doesn't trigger a problem right now, but if there is a problem, I suspect its trigger window is a lot smaller than with the rdev initialization problem... Gr. Matthijs --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -1066,6 +1066,7 @@ /* tx bits */ rdev->tx_resolution = XYZ; #endif + nvt->rdev = rdev; ret = -EBUSY; /* now claim resources */ @@ -1090,7 +1091,6 @@ goto failure5; device_init_wakeup(&pdev->dev, true); - nvt->rdev = rdev; nvt_pr(KERN_NOTICE, "driver has been successfully loaded\n"); if (debug) { cir_dump_regs(nvt);