Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763736AbZAQVs3 (ORCPT ); Sat, 17 Jan 2009 16:48:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753135AbZAQVsE (ORCPT ); Sat, 17 Jan 2009 16:48:04 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:44666 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755133AbZAQVsB (ORCPT ); Sat, 17 Jan 2009 16:48:01 -0500 X-Envelope-From: stefanr@s5r6.in-berlin.de Date: Sat, 17 Jan 2009 22:47:58 +0100 (CET) From: Stefan Richter Subject: [PATCH 4/4] firewire: core: remove condition which is always false To: linux1394-devel@lists.sourceforge.net cc: linux-kernel@vger.kernel.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=us-ascii Content-Disposition: INLINE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1269 Lines: 40 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 --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/