linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linuxsh-dev@lists.sourceforge.net
Cc: linux-ide@vger.kernel.org
Subject: [PATCH] pata_platform: Fix NULL pointer dereference
Date: Tue, 17 Jul 2007 17:42:52 +0900	[thread overview]
Message-ID: <20070717084252.29884.24167.sendpatchset@clockwork.opensource.se> (raw)

pata_platform: Fix NULL pointer dereference

The platform-specific structures may leave pdev->dev.platform_data as NULL.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 Tested on a Solution Engline 7722
 Applies to git linux-2.6 a5fcaa210626a79465321e344c91a6a7dc3881fa

 drivers/ata/pata_platform.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- 0001/drivers/ata/pata_platform.c
+++ work/drivers/ata/pata_platform.c	2007-07-17 15:01:09.000000000 +0900
@@ -213,8 +213,9 @@ static int __devinit pata_platform_probe
 	pata_platform_setup_port(&ap->ioaddr, pp_info);
 
 	/* activate */
-	return ata_host_activate(host, platform_get_irq(pdev, 0), ata_interrupt,
-				 pp_info->irq_flags, &pata_platform_sht);
+	return ata_host_activate(host, platform_get_irq(pdev, 0), 
+				 ata_interrupt, pp_info ? pp_info->irq_flags
+				 : 0, &pata_platform_sht);
 }
 
 /**

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

             reply	other threads:[~2007-07-17  8:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-17  8:42 Magnus Damm [this message]
2007-07-17  9:02 ` [PATCH] pata_platform: Fix NULL pointer dereference Paul Mundt
2007-07-17  9:33   ` Jeff Garzik
2007-07-17  9:47     ` Paul Mundt
2007-07-17 10:24       ` Jeff Garzik
2007-07-17 11:01         ` Paul Mundt
2007-07-18  9:32     ` Magnus Damm

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=20070717084252.29884.24167.sendpatchset@clockwork.opensource.se \
    --to=magnus.damm@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linuxsh-dev@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).