ide-cd: fix another NULL ptr in debug statement
PATCH 1/1 ide-cd: fix another NULL ptr in debug statement
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 <[email protected]>
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 <[email protected]>
--- drivers/ide/ide-cd.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
drivers/ide/ide-cd.c +7 -4
@@ -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 ;
Signature · 5 lines
1.5.5.4
--
Regards/Gruss,
Boris.Quoted 4 lines · Borislav Petkov
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.
also merged into the original patch