From: Kirill Smelkov Date: Tue, 3 Oct 2006 08:14:18 +0000 (-0700) Subject: [PATCH] ide: fix revision comparison in ide_in_drive_list X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=14e0a193209aeea810ad3d66388f422dc79c5b40;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] ide: fix revision comparison in ide_in_drive_list Fix ide_in_drive_list: drive_table->id_firmware should be searched *in* id->fw_rev, not vice versa. Signed-off-by: Kirill Smelkov Cc: Bartlomiej Zolnierkiewicz Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 22ef73eb1f68..53feaf82576e 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -145,7 +145,7 @@ int ide_in_drive_list(struct hd_driveid *id, const struct drive_list_entry *driv { for ( ; drive_table->id_model ; drive_table++) if ((!strcmp(drive_table->id_model, id->model)) && - ((strstr(drive_table->id_firmware, id->fw_rev)) || + ((strstr(id->fw_rev, drive_table->id_firmware)) || (!strcmp(drive_table->id_firmware, "ALL")))) return 1; return 0;