OSDN Git Service

ocxl: Clarify error path in setup_xsl_irq()
authorGreg Kurz <groug@kaod.org>
Mon, 10 Dec 2018 15:18:13 +0000 (16:18 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Dec 2018 11:21:20 +0000 (22:21 +1100)
commit759bc01586535700fbb1aaf40dd727146e2e8b57
treeb1ba3fd6fe680e874d15a7b0eb2e89973adf623c
parent3cfb9ebe906b51f2942b1e251009bb251efd2ba6
ocxl: Clarify error path in setup_xsl_irq()

Implementing rollback with goto and labels is a common practice that
leads to prettier and more maintainable code. FWIW, this design pattern
is already being used in alloc_link() a few lines below in this file.

Do the same in setup_xsl_irq().

Signed-off-by: Greg Kurz <groug@kaod.org>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/ocxl/link.c