From: Shardar Shariff Md Date: Tue, 5 May 2015 14:17:54 +0000 (+0100) Subject: serial: tegra: check the count and read if any from dma X-Git-Tag: omap-for-v4.2/wakeirq-drivers-v2^2~72 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db8e78474efd5006ece9ed15d804b78ec6e70702;p=pandora-kernel.git serial: tegra: check the count and read if any from dma It is only necessary to read data from the dma buffer when the count value is non-zero and hence, tegra_uart_copy_rx_to_tty() so only be called when this is the case. Although, this was being tested for in two places, there is a third place where this was not tested. However, instead of adding another if-statement prior to calling tegra_uart_copy_rx_to_tty(), move the test inside the function. Signed-off-by: Shardar Shariff Md [jonathanh@nvidia.com: Re-worked patch to move the check for the count value inside the function tegra_uart_copy_rx_to_tty(). Updated changelog with more commentary.] Signed-off-by: Jon Hunter Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed