Re: hpt366 ptr use before NULL check.

From: Dave Jones
Date: Fri Sep 03 2004 - 17:33:44 EST


On Sat, Sep 04, 2004 at 12:17:07AM +0200, Bartlomiej Zolnierkiewicz wrote:
>
> bogus, hwif can't be NULL
> please remove checks instead


As you wish.


Signed-off-by: Dave Jones <davej@xxxxxxxxxx>

--- latest-FC2/drivers/ide/pci/hpt366.c~ 2004-09-03 23:26:29.092342152 +0100
+++ latest-FC2/drivers/ide/pci/hpt366.c 2004-09-03 23:27:28.249348920 +0100
@@ -777,9 +777,6 @@
u8 reg59h = 0, reset = (hwif->channel) ? 0x80 : 0x40;
u8 regXXh = 0, state_reg= (hwif->channel) ? 0x57 : 0x53;

- if (!hwif)
- return -EINVAL;
-
// hwif->bus_state = state;

pci_read_config_byte(dev, 0x59, &reg59h);
@@ -813,9 +810,6 @@
u8 tristate = 0, resetmask = 0, bus_reg = 0;
u16 tri_reg;

- if (!hwif)
- return -EINVAL;
-
hwif->bus_state = state;

if (hwif->channel) {
-
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/