Searched hist:"73 d9cdca1ced6ab32be363b58699039bd82b062a" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/dma/ |
H A D | mv_xor.c | diff 73d9cdca1ced6ab32be363b58699039bd82b062a Thu Nov 22 11:22:59 CST 2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> dma: mv_xor: fix error handling path
The ->probe() function of the mv_xor function contains in its error handling code a loop to cleanup the XOR channels that had been successfully initialized if some other XOR channel fails to be initialized. It does that by traveling the list of XOR channels, and cleanup those for which the pointer is not NULL.
However, since the mv_xor_channel_add() function return a PTR_ERR style value, the pointer is not NULL on error. So, when handling the error of a given channel initialization, we cleanup this channel initialization and mark this channel entry as NULL in the array. This allows the remaining of the cleanup (for other channels) to work properly.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|