public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: linux-omap@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>,
	David Brownell <dbrownell@users.sourceforge.net>,
	Felipe Balbi <felipe.balbi@nokia.com>
Subject: [PATCH 01/25] twl4030: fix potential null pointer dereference
Date: Tue, 30 Sep 2008 21:42:45 +0300	[thread overview]
Message-ID: <1222800189-29737-2-git-send-email-me@felipebalbi.com> (raw)
In-Reply-To: <1222800189-29737-1-git-send-email-me@felipebalbi.com>

From: Felipe Balbi <felipe.balbi@nokia.com>

The following patch fix a potential null pointer
dereference in twl4030 keypad driver when parts
of keypad platform_data aren't passed down to the
driver. At that point kp->dbg_dev is not set yet.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
---
 drivers/input/keyboard/omap-twl4030keypad.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/omap-twl4030keypad.c b/drivers/input/keyboard/omap-twl4030keypad.c
index 3893d63..48f29d3 100644
--- a/drivers/input/keyboard/omap-twl4030keypad.c
+++ b/drivers/input/keyboard/omap-twl4030keypad.c
@@ -238,7 +238,7 @@ static int __init omap_kp_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	if (!pdata->rows || !pdata->cols || !pdata->keymap) {
-		dev_err(kp->dbg_dev, "No rows, cols or keymap from pdata\n");
+		dev_err(&pdev->dev, "No rows, cols or keymap from pdata\n");
 		kfree(kp);
 		return -EINVAL;
 	}
-- 
1.6.0.1.196.g01914


  reply	other threads:[~2008-09-30 18:43 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-30 18:42 [PATCH 00/25] twl4030 patches (v5) Felipe Balbi
2008-09-30 18:42 ` Felipe Balbi [this message]
2008-09-30 18:42   ` [PATCH 02/25] twl4030-gpio: Remove default pullup enable/disable of GPIO Felipe Balbi
2008-09-30 18:42     ` [PATCH 03/25] i2c: clean add_children a bit Felipe Balbi
2008-09-30 18:42       ` [PATCH 04/25] i2c: move twl4030_keypad to new style registration Felipe Balbi
2008-09-30 18:42         ` [PATCH 05/25] i2c: move twl4030-usb to platform_device Felipe Balbi
2008-09-30 18:42           ` [PATCH 06/25] i2c: twl4030-usb: add 'vbus' sysfs file Felipe Balbi
2008-09-30 18:42             ` [PATCH 07/25] twl4030 gpio platform data Felipe Balbi
2008-09-30 18:42               ` [PATCH 08/25] twl4030 uses gpiolib Felipe Balbi
2008-09-30 18:42                 ` [PATCH 09/25] i2c: move twl4030-madc to new registration style Felipe Balbi
2008-09-30 18:42                   ` [PATCH 10/25] minor twl4030-core cleanups Felipe Balbi
2008-09-30 18:42                     ` [PATCH 11/25] provide detailed diagnostics in add_children() Felipe Balbi
2008-09-30 18:42                       ` [PATCH 12/25] move twl4030-gpio to drivers/gpio Felipe Balbi
2008-09-30 18:42                         ` [PATCH 13/25] i2c: added a few missing gotos to add_children() Felipe Balbi
2008-09-30 18:42                           ` [PATCH 14/25] minor irq-related cleanups Felipe Balbi
2008-09-30 18:42                             ` [PATCH 15/25] i2c: switch twl4030-usb to use a resource for irq Felipe Balbi
2008-09-30 18:43                               ` [PATCH 16/25] Move I2C driver model init earlier in the boot sequence Felipe Balbi
2008-09-30 18:43                                 ` [PATCH 17/25] i2c: minor cleanups to twl4030-pwrbutton.c Felipe Balbi
2008-09-30 18:43                                   ` [PATCH 18/25] twl4030-gpio irq_chip.set_type Felipe Balbi
2008-09-30 18:43                                     ` [PATCH 19/25] twl4030-gpio: remove legacy irq triggering calls and user Felipe Balbi
2008-09-30 18:43                                       ` [PATCH 20/25] twl4030-gpio: irq and other cleanup Felipe Balbi
2008-09-30 18:43                                         ` [PATCH 21/25] twl4030-core: portability updates Felipe Balbi
2008-09-30 18:43                                           ` [PATCH 22/25] twl4030: minor cleanups to twl4030_bci_battery.c Felipe Balbi
2008-09-30 18:43                                             ` [PATCH 23/25] twl4030-bci: move to new style registration method Felipe Balbi
2008-09-30 18:43                                               ` [PATCH 24/25] twl4030-gpio: pullup/pulldown init Felipe Balbi
2008-09-30 18:43                                                 ` [PATCH 25/25] twl4030-gpio: beagle pull up/down init Felipe Balbi
2008-10-01  6:49                                               ` [PATCH 23/25] twl4030-bci: move to new style registration method Pakaravoor, Jagadeesh
2008-09-30 21:45                   ` [PATCH 09/25] i2c: move twl4030-madc to new registration style David Brownell
2008-09-30 22:28                     ` Felipe Balbi
2008-09-30 21:42         ` [PATCH 04/25] i2c: move twl4030_keypad to new style registration David Brownell
2008-09-30 22:30           ` Felipe Balbi
2008-09-30 19:41 ` [PATCH 00/25] twl4030 patches (v5) David Brownell
2008-09-30 23:30   ` Steve Sakoman
2008-10-01 10:42     ` Tony Lindgren
2008-09-30 19:49 ` [PATCH 26/25] twl4030 gpio cleanups David Brownell
2008-09-30 20:16   ` Felipe Balbi
2008-10-01 10:42     ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1222800189-29737-2-git-send-email-me@felipebalbi.com \
    --to=me@felipebalbi.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=felipe.balbi@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox