ctrl: Improve error handling if controlif setup fails
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index b528a66..7427ead 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -269,6 +269,11 @@
 	bsc_api_init(bsc_gsmnet, msc_bsc_api());
 
 	bsc_gsmnet->ctrl = controlif_setup(bsc_gsmnet, 4249);
+	if (!bsc_gsmnet->ctrl) {
+		printf("Failed to initialize control interface. Exiting.\n");
+		return -1;
+	}
+
 	/* seed the PRNG */
 	srand(time(NULL));