Hello.
Alan Cox wrote:
Signed-off-by: Alan Cox <alan@xxxxxxxxxx>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc8-mm1/drivers/ide/pci/pdc202xx_old.c linux-2.6.24-rc8-mm1/drivers/ide/pci/pdc202xx_old.c
--- linux.vanilla-2.6.24-rc8-mm1/drivers/ide/pci/pdc202xx_old.c 2008-01-19 14:47:56.000000000 +0000
+++ linux-2.6.24-rc8-mm1/drivers/ide/pci/pdc202xx_old.c 2008-01-19 15:00:08.000000000 +0000
@@ -138,7 +138,7 @@
static u8 __devinit pdc2026x_old_cable_detect(ide_hwif_t *hwif)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
- u16 CIS = 0, mask = (hwif->channel) ? (1<<11) : (1<<10);
+ u16 CIS, mask = (hwif->channel) ? (1<<11) : (1<<10);
pci_read_config_word(dev, 0x50, &CIS);
Since we ignore the result of this function, if it fails CIS may be left
uninitialized if the function fails. So, the initializer is not as useless as
it seems (and there's a lot more of such cases in drivers/ide/pci/ :-)...
MBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html