diff options
-rw-r--r-- | drivers/message/fusion/mptfc.c | 3 | ||||
-rw-r--r-- | drivers/message/fusion/mptspi.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index bf2a2cef562b..d8bf84aef602 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
@@ -525,8 +525,7 @@ mptfc_target_destroy(struct scsi_target *starget) | |||
525 | if (ri) /* better be! */ | 525 | if (ri) /* better be! */ |
526 | ri->starget = NULL; | 526 | ri->starget = NULL; |
527 | } | 527 | } |
528 | if (starget->hostdata) | 528 | kfree(starget->hostdata); |
529 | kfree(starget->hostdata); | ||
530 | starget->hostdata = NULL; | 529 | starget->hostdata = NULL; |
531 | } | 530 | } |
532 | 531 | ||
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 7b4db9acf7d7..787933d43d32 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -461,8 +461,7 @@ static int mptspi_target_alloc(struct scsi_target *starget) | |||
461 | static void | 461 | static void |
462 | mptspi_target_destroy(struct scsi_target *starget) | 462 | mptspi_target_destroy(struct scsi_target *starget) |
463 | { | 463 | { |
464 | if (starget->hostdata) | 464 | kfree(starget->hostdata); |
465 | kfree(starget->hostdata); | ||
466 | starget->hostdata = NULL; | 465 | starget->hostdata = NULL; |
467 | } | 466 | } |
468 | 467 | ||