Commit 628400cc authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] hpt366 ptr use before NULL check.

This pointer is used prior to a test for NULL.  But Bart says it can never
be NULL.
Signed-off-by: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6bd49631
...@@ -777,9 +777,6 @@ static int hpt3xx_tristate (ide_drive_t * drive, int state) ...@@ -777,9 +777,6 @@ static int hpt3xx_tristate (ide_drive_t * drive, int state)
u8 reg59h = 0, reset = (hwif->channel) ? 0x80 : 0x40; u8 reg59h = 0, reset = (hwif->channel) ? 0x80 : 0x40;
u8 regXXh = 0, state_reg= (hwif->channel) ? 0x57 : 0x53; u8 regXXh = 0, state_reg= (hwif->channel) ? 0x57 : 0x53;
if (!hwif)
return -EINVAL;
// hwif->bus_state = state; // hwif->bus_state = state;
pci_read_config_byte(dev, 0x59, &reg59h); pci_read_config_byte(dev, 0x59, &reg59h);
...@@ -813,9 +810,6 @@ static int hpt370_busproc(ide_drive_t * drive, int state) ...@@ -813,9 +810,6 @@ static int hpt370_busproc(ide_drive_t * drive, int state)
u8 tristate = 0, resetmask = 0, bus_reg = 0; u8 tristate = 0, resetmask = 0, bus_reg = 0;
u16 tri_reg; u16 tri_reg;
if (!hwif)
return -EINVAL;
hwif->bus_state = state; hwif->bus_state = state;
if (hwif->channel) { if (hwif->channel) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment