[PATCH] ide-cd: fix another NULL ptr in debug statement
From: Borislav Petkov
Date: Thu Sep 25 2008 - 03:51:53 EST
Hi Bart,
here's another null ptr fix in the debugging code. I'll be auditing all the
debug fragments in case I've missed some.
---
From: Borislav Petkov <petkovbb@xxxxxxxxx>
Date: Thu, 25 Sep 2008 09:36:26 +0200
Subject: [PATCH] ide-cd: fix another NULL ptr in debug statement
There should be no functionality change resulting from this patch.
Signed-off-by: Borislav Petkov <petkovbb@xxxxxxxxx>
---
drivers/ide/ide-cd.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 5ed925d..c830817 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -166,10 +166,13 @@ static void cdrom_analyze_sense_data(ide_drive_t *drive,
unsigned long bio_sectors;
struct cdrom_info *info = drive->driver_data;
- ide_debug_log(IDE_DBG_SENSE, "Call %s, failed cmd: 0x%x, "
- "error_code: 0x%x, sense_key: 0x%x\n",
- __func__, failed_command->cmd[0], sense->error_code,
- sense->sense_key);
+ ide_debug_log(IDE_DBG_SENSE, "Call %s, error_code: 0x%x, "
+ "sense_key: 0x%x\n", __func__, sense->error_code,
+ sense->sense_key);
+
+ if (failed_command)
+ ide_debug_log(IDE_DBG_SENSE, "%s: failed cmd: 0x%x\n",
+ __func__, failed_command->cmd[0]);
if (!cdrom_log_sense(drive, failed_command, sense))
return;
--
1.5.5.4
--
Regards/Gruss,
Boris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/