diff options
author | Alan Cox <alan@redhat.com> | 2007-07-03 16:28:35 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-03 16:28:35 -0400 |
commit | 785955752fde4c555a1d9f74ddfe1f7aca3e0c7f (patch) | |
tree | 0019a73818f02602467ba3e87d30109128a57f78 | |
parent | b42fa133110fa952299fa76cbe91226c14838261 (diff) |
ide: Fix a theoretical Ooops case
Found by a static analyser. It is in theory possible we dereference
dev->id when it has become invalid. Re-order to avoid this.
Not needed for new-ide as we no longer support the crazy exabyte nest stuff
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/ide-probe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 41bfa4d21ab6..f5ce22c38f82 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -574,11 +574,11 @@ static inline u8 probe_for_drive (ide_drive_t *drive) | |||
574 | /* look for ATAPI device */ | 574 | /* look for ATAPI device */ |
575 | (void) do_probe(drive, WIN_PIDENTIFY); | 575 | (void) do_probe(drive, WIN_PIDENTIFY); |
576 | } | 576 | } |
577 | if (strstr(drive->id->model, "E X A B Y T E N E S T")) | ||
578 | enable_nest(drive); | ||
579 | if (!drive->present) | 577 | if (!drive->present) |
580 | /* drive not found */ | 578 | /* drive not found */ |
581 | return 0; | 579 | return 0; |
580 | if (strstr(drive->id->model, "E X A B Y T E N E S T")) | ||
581 | enable_nest(drive); | ||
582 | 582 | ||
583 | /* identification failed? */ | 583 | /* identification failed? */ |
584 | if (!drive->id_read) { | 584 | if (!drive->id_read) { |