From: Thomas Petazzoni Date: Sun, 6 Jan 2013 10:10:43 +0000 (+0100) Subject: dma: mv_xor: fix error handling of mv_xor_channel_add() X-Git-Tag: v3.8-rc3~5^2~4^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab6e439fd07aba7cadcadb3fb5e11d3758e19679;p=pandora-kernel.git dma: mv_xor: fix error handling of mv_xor_channel_add() When mv_xor_channel_add() fails for one XOR channel, we jump to the err_channel_add label to clean up all previous channels that had been initialized correctly. Unfortunately, while handling this error condition, we were disposing the IRQ mapping before calling mv_xor_channel_remove() (which does the free_irq()), which is incorrect. Instead, do things properly in the reverse order of the initialization: first remove the XOR channel (so that free_irq() is done), and then dispose the IRQ mapping. This avoids ugly warnings when for some reason one of the XOR channel fails to initialize. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- Reading git-diff-tree failed