* [PATCH] ide-cd: fix debug printk
@ 2008-09-19 17:38 Borislav Petkov
2008-09-27 16:24 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2008-09-19 17:38 UTC (permalink / raw)
To: bzolnier; +Cc: linux-ide, linux-kernel
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.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ide-cd: fix debug printk
2008-09-19 17:38 [PATCH] ide-cd: fix debug printk Borislav Petkov
@ 2008-09-27 16:24 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-09-27 16:24 UTC (permalink / raw)
To: petkovbb; +Cc: linux-ide, linux-kernel
On Friday 19 September 2008, Borislav Petkov wrote:
> 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>
Thanks, I merged it into the original patch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-27 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19 17:38 [PATCH] ide-cd: fix debug printk Borislav Petkov
2008-09-27 16:24 ` Bartlomiej Zolnierkiewicz
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).