Commit fc789a93 authored by James Bottomley's avatar James Bottomley Committed by James Bottomley

[SCSI] aic7xxx/79xx: fix another potential panic due to a non existent target

I ran into this one sending bus resets across the hardware.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 79778a27
...@@ -1617,9 +1617,9 @@ ahd_send_async(struct ahd_softc *ahd, char channel, ...@@ -1617,9 +1617,9 @@ ahd_send_async(struct ahd_softc *ahd, char channel,
* are identical to those last reported. * are identical to those last reported.
*/ */
starget = ahd->platform_data->starget[target]; starget = ahd->platform_data->starget[target];
targ = scsi_transport_target_data(starget); if (starget == NULL)
if (targ == NULL)
break; break;
targ = scsi_transport_target_data(starget);
target_ppr_options = target_ppr_options =
(spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
......
...@@ -1618,9 +1618,9 @@ ahc_send_async(struct ahc_softc *ahc, char channel, ...@@ -1618,9 +1618,9 @@ ahc_send_async(struct ahc_softc *ahc, char channel,
if (channel == 'B') if (channel == 'B')
target_offset += 8; target_offset += 8;
starget = ahc->platform_data->starget[target_offset]; starget = ahc->platform_data->starget[target_offset];
targ = scsi_transport_target_data(starget); if (starget == NULL)
if (targ == NULL)
break; break;
targ = scsi_transport_target_data(starget);
target_ppr_options = target_ppr_options =
(spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
......
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