From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Jarzmik Subject: Re: [PATCHv2 1/3] spi: pxa2xx: handle error of pxa2xx_spi_dma_prepare() Date: Thu, 24 Mar 2016 22:36:25 +0100 Message-ID: <877fgrsgme.fsf@belgarion.home> References: <1458826544-28553-1-git-send-email-jarkko.nikula@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Brown , Daniel Mack , Haojian Zhuang , Mika Westerberg , Andy Shevchenko To: Jarkko Nikula Return-path: In-Reply-To: <1458826544-28553-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> (Jarkko Nikula's message of "Thu, 24 Mar 2016 15:35:42 +0200") Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Jarkko Nikula writes: > From: Andy Shevchenko > > If by some reason pxa2xx_spi_dma_prepare() fails we have not to ignore its > error. In such case we abort the transfer and return the error to upper > level. > > Signed-off-by: Andy Shevchenko > [Jarkko: Avoid leaking TX descriptors in case RX descriptor allocation > fails. Noted by Robert Jarzmik . > Unmap also buffers in case of failure.] > Signed-off-by: Jarkko Nikula > --- > Reposting Andy's fix from December that got buried to list during > holidays. > --- > drivers/spi/spi-pxa2xx-dma.c | 13 +++++++++++-- > drivers/spi/spi-pxa2xx.c | 8 +++++++- > 2 files changed, 18 insertions(+), 3 deletions(-) Acked-by: Robert Jarzmik Cheers. -- Robert -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html