Skip to content

Commit

Permalink
ide: Fix a theoretical Ooops case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Bartlomiej Zolnierkiewicz committed Jul 3, 2007
1 parent b42fa13 commit 7859557
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,11 @@ static inline u8 probe_for_drive (ide_drive_t *drive)
/* look for ATAPI device */
(void) do_probe(drive, WIN_PIDENTIFY);
}
if (strstr(drive->id->model, "E X A B Y T E N E S T"))
enable_nest(drive);
if (!drive->present)
/* drive not found */
return 0;
if (strstr(drive->id->model, "E X A B Y T E N E S T"))
enable_nest(drive);

/* identification failed? */
if (!drive->id_read) {
Expand Down

0 comments on commit 7859557

Please sign in to comment.