diff options
Diffstat (limited to 'drivers/scsi/device_handler/scsi_dh_hp_sw.c')
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_hp_sw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c index e3916641e62..b479f1eef96 100644 --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c | |||
@@ -225,7 +225,8 @@ static void start_stop_endio(struct request *req, int error) | |||
225 | } | 225 | } |
226 | } | 226 | } |
227 | done: | 227 | done: |
228 | blk_put_request(req); | 228 | req->end_io_data = NULL; |
229 | __blk_put_request(req->q, req); | ||
229 | if (h->callback_fn) { | 230 | if (h->callback_fn) { |
230 | h->callback_fn(h->callback_data, err); | 231 | h->callback_fn(h->callback_data, err); |
231 | h->callback_fn = h->callback_data = NULL; | 232 | h->callback_fn = h->callback_data = NULL; |
@@ -338,8 +339,8 @@ static int hp_sw_bus_attach(struct scsi_device *sdev) | |||
338 | unsigned long flags; | 339 | unsigned long flags; |
339 | int ret; | 340 | int ret; |
340 | 341 | ||
341 | scsi_dh_data = kzalloc(sizeof(struct scsi_device_handler *) | 342 | scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) |
342 | + sizeof(struct hp_sw_dh_data) , GFP_KERNEL); | 343 | + sizeof(*h) , GFP_KERNEL); |
343 | if (!scsi_dh_data) { | 344 | if (!scsi_dh_data) { |
344 | sdev_printk(KERN_ERR, sdev, "%s: Attach Failed\n", | 345 | sdev_printk(KERN_ERR, sdev, "%s: Attach Failed\n", |
345 | HP_SW_NAME); | 346 | HP_SW_NAME); |