[PATCH 4/4] firewire: core: remove condition which is always false

From: Stefan Richter
Date: Sat Jan 17 2009 - 16:48:31 EST


reread_bus_info_block() only gets to see devices whose config_rom_length
is at least 6 (ROM header, bus info block, root directory header).

Signed-off-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>
---
drivers/firewire/fw-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/firewire/fw-device.c
===================================================================
--- linux.orig/drivers/firewire/fw-device.c
+++ linux/drivers/firewire/fw-device.c
@@ -887,15 +887,15 @@ static int reread_bus_info_block(struct
for (i = 0; i < 6; i++) {
if (read_rom(device, generation, i, &q) != RCODE_COMPLETE)
return REREAD_BIB_ERROR;

if (i == 0 && q == 0)
return REREAD_BIB_GONE;

- if (i > device->config_rom_length || q != device->config_rom[i])
+ if (q != device->config_rom[i])
return REREAD_BIB_CHANGED;
}

return REREAD_BIB_UNCHANGED;
}

static void fw_device_refresh(struct work_struct *work)

--
Stefan Richter
-=====-==--= ---= =---=
http://arcgraph.de/sr/

--
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/