dmaengine: jz4780: Fix error handling/signedness issues
authorAlex Smith <alex.smith@imgtec.com>
Fri, 24 Jul 2015 16:24:22 +0000 (17:24 +0100)
committerVinod Koul <vinod.koul@intel.com>
Tue, 18 Aug 2015 16:58:49 +0000 (22:28 +0530)
commit839896ef3fdacf3a27460b6f6dabc6ac1475a00c
treea8e2c9dbdf9187c39253b9b1822415f47095c8a9
parentdc578f314e2471ca93a4c1f80988ecc781836f72
dmaengine: jz4780: Fix error handling/signedness issues

There are a some signedness bugs such as testing for < 0 on unsigned
return values. Additionally there are some cases where functions which
should return NULL on error actually return a PTR_ERR value which can
result in oopses on error. Fix these issues.

Signed-off-by: Alex Smith <alex.smith@imgtec.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dma-jz4780.c