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