]> asedeno.scripts.mit.edu Git - linux.git/commit
serdev: fix controller-allocation error handling
authorJohan Hovold <johan@kernel.org>
Thu, 12 Oct 2017 13:28:18 +0000 (15:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Oct 2017 09:25:48 +0000 (11:25 +0200)
commit978d6fac5d0617c9722ae1db1accee46776f4400
tree3c1153ded6911d27552cdec2c0edf978ada8f92d
parent08fcee289f341786eb3b44e5f2d1dc850943238e
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: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serdev/core.c