Hi, this patch makes dma_async_device_register() in drivers/dma/dmaengine.c handle a failing class_device_register(). Patched against Linus' git tree, compile-tested. I also thought about calling dma_async_device_unregister on failure, but I was not quite sure if this would work. And I noticed that memory is allocated for chan->local in dma_async_device_register() but I couldn't find where it is released again. I am quite new to this all, please give me feedback! Signed-off-by: Johannes Weiner