From patchwork Wed Jul 20 05:30:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 990272 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6K5WZvk012373 for ; Wed, 20 Jul 2011 05:32:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750843Ab1GTFce (ORCPT ); Wed, 20 Jul 2011 01:32:34 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:63970 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777Ab1GTFcd (ORCPT ); Wed, 20 Jul 2011 01:32:33 -0400 Received: by wyg8 with SMTP id 8so3233484wyg.19 for ; Tue, 19 Jul 2011 22:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=//0QjU6F72eNfxoqxmzk2YwwQYYXbyG/rkPd9dan7vE=; b=EF6TBDAAiqIZ0jmj671v8dQVX2wWSvrFGYuhDuEXcy6EdDXZbR/Xx+X6Qrx8KbSTTi IvmonJRc8wR2IOn5SZT3aTqt51paj2X25A8ON/53vnV65D6EMyM6X5FYsJjGG+huzS7b HJtOS/U1cxKWhSJWK3IaVuNaMqqXqBaxU0Uts= Received: by 10.216.234.144 with SMTP id s16mr184975weq.80.1311139952701; Tue, 19 Jul 2011 22:32:32 -0700 (PDT) Received: from shale.localdomain ([41.202.225.152]) by mx.google.com with ESMTPS id gg16sm4889525wbb.51.2011.07.19.22.32.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Jul 2011 22:32:31 -0700 (PDT) Date: Wed, 20 Jul 2011 08:30:41 +0300 From: Dan Carpenter To: Chris Hudson Cc: Dmitry Torokhov , linux-input@vger.kernel.org Subject: [patch 1/2] input: kxtj9: fix bug in probe() Message-ID: <20110720053041.GD6445@shale.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 20 Jul 2011 05:32:35 +0000 (UTC) We are testing the wrong variable here. I believe tj9->input_dev is always NULL at this point, so probe() will fail. Signed-off-by: Dan Carpenter --- Compile tested. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c index a416f7f..6c96dc3 100644 --- a/drivers/input/misc/kxtj9.c +++ b/drivers/input/misc/kxtj9.c @@ -301,7 +301,7 @@ static int __devinit kxtj9_setup_input_device(struct kxtj9_data *tj9) int err; input_dev = input_allocate_device(); - if (!tj9->input_dev) { + if (!input_dev) { dev_err(&tj9->client->dev, "input device allocate failed\n"); return -ENOMEM; }