serdev: fix controller-allocation error handling
Reorder controller initialisation so that in the unlikely event that id allocation fails, we don't end up releasing id 0 in the destructor. Signed-off-by: NJohan Hovold <johan@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录