Re: [PATCH 5/5] drivers/serial: Return -ENOMEM on memory allocation failure

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Patrick Gefre
Date: Wednesday, August 11, 2010 - 8:59 am

Julia Lawall wrote:

Signed-off-by: Pat Gefre <pfg@sgi.com>




Yes you are right, there should be something like this for out4:

out4:
	for (phys_port = 0; phys_port < PORTS_PER_CARD; phys_port++) {
		port = card_ptr->ic_port[phys_port].icp_port;
		if (port) {
			pci_free_consistent(port->ip_idd->pdev,
                                        TOTAL_RING_BUF_SIZE,
                                        (void *)port->ip_cpu_ringbuf,
                                        port->ip_dma_ringbuf);
			kfree(port);
		}
	}
	kfree(card_ptr);
	return ret;





--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 5/5] drivers/serial: Return -ENOMEM on memory a ..., Patrick Gefre, (Wed Aug 11, 8:59 am)