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: NAtsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: NDan Williams <dan.j.williams@intel.com>
Showing
想要评论请 注册 或 登录