[PATCH] libata: ahci: remove ata_port_start/stop() calls

This patch removes unnecessary ata_port_start/stop() calls from
ahci_port_start/stop().

Signed-off-by: Tejun Heo <htejun@gmail.com>

authored by Tejun Heo and committed by Jeff Garzik 0a139e79 62ba2841

+4 -18
+4 -18
drivers/scsi/ahci.c
··· 304 304 struct device *dev = ap->host_set->dev; 305 305 struct ahci_host_priv *hpriv = ap->host_set->private_data; 306 306 struct ahci_port_priv *pp; 307 - int rc; 308 307 void *mem, *mmio = ap->host_set->mmio_base; 309 308 void *port_mmio = ahci_port_base(mmio, ap->port_no); 310 309 dma_addr_t mem_dma; 311 310 312 - rc = ata_port_start(ap); 313 - if (rc) 314 - return rc; 315 - 316 311 pp = kmalloc(sizeof(*pp), GFP_KERNEL); 317 - if (!pp) { 318 - rc = -ENOMEM; 319 - goto err_out; 320 - } 312 + if (!pp) 313 + return -ENOMEM; 321 314 memset(pp, 0, sizeof(*pp)); 322 315 323 316 mem = dma_alloc_coherent(dev, AHCI_PORT_PRIV_DMA_SZ, &mem_dma, GFP_KERNEL); 324 317 if (!mem) { 325 - rc = -ENOMEM; 326 - goto err_out_kfree; 318 + kfree(pp); 319 + return -ENOMEM; 327 320 } 328 321 memset(mem, 0, AHCI_PORT_PRIV_DMA_SZ); 329 322 ··· 366 373 readl(port_mmio + PORT_CMD); /* flush */ 367 374 368 375 return 0; 369 - 370 - err_out_kfree: 371 - kfree(pp); 372 - err_out: 373 - ata_port_stop(ap); 374 - return rc; 375 376 } 376 377 377 378 ··· 391 404 dma_free_coherent(dev, AHCI_PORT_PRIV_DMA_SZ, 392 405 pp->cmd_slot, pp->cmd_slot_dma); 393 406 kfree(pp); 394 - ata_port_stop(ap); 395 407 } 396 408 397 409 static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg_in)