From: Dan Williams Date: Wed, 25 Mar 2009 16:13:23 +0000 (-0700) Subject: dmaengine: fail device registration if channel registration fails X-Git-Tag: v2.6.30-rc1~225^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=257b17ca030387cb17314cd1851507bdd1b4ddd5;p=pandora-kernel.git dmaengine: fail device registration if channel registration fails Atsushi points out: "If alloc_percpu or kzalloc failed, chan_id does not match with its position in device->channels list. And above "continue" looks buggy anyway. Keeping incomplete channels in device->channels list looks very dangerous..." Also, fix up leakage of idr_ref in the idr_pre_get() and channel init fail cases. Reported-by: Atsushi Nemoto Signed-off-by: Dan Williams --- Reading git-diff-tree failed