From: Borislav Petkov <petkovbb@googlemail.com>
To: bzolnier@gmail.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ide-cd: fix debug printk
Date: Fri, 19 Sep 2008 19:38:03 +0200 [thread overview]
Message-ID: <20080919173803.GA21355@gollum.tnic> (raw)
Hi Bart,
please apply.
---
From: Borislav Petkov <petkovbb@gmail.com>
Date: Fri, 19 Sep 2008 19:30:46 +0200
Subject: [PATCH] ide-cd: fix debug printk
failed_command can be NULL so check it before accessing it.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
---
drivers/ide/ide-cd.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 3fdf660..5ed925d 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -221,6 +221,8 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
struct cdrom_info *info = drive->driver_data;
struct request *rq = &info->request_sense_request;
+ ide_debug_log(IDE_DBG_SENSE, "Call %s\n", __func__);
+
if (sense == NULL)
sense = &info->sense_data;
@@ -240,8 +242,9 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense,
/* NOTE! Save the failed command in "rq->buffer" */
rq->buffer = (void *) failed_command;
- ide_debug_log(IDE_DBG_SENSE, "Call %s, failed_cmd: 0x%x\n", __func__,
- failed_command->cmd[0]);
+ if (failed_command)
+ ide_debug_log(IDE_DBG_SENSE, "failed_cmd: 0x%x\n",
+ failed_command->cmd[0]);
ide_do_drive_cmd(drive, rq);
}
--
1.5.5.1
--
Regards/Gruss,
Boris.
next reply other threads:[~2008-09-19 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-19 17:38 Borislav Petkov [this message]
2008-09-27 16:24 ` Bartlomiej Zolnierkiewicz
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=20080919173803.GA21355@gollum.tnic \
--to=petkovbb@googlemail.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.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
all inboxes | Powered by JetHome®