ivi-layout: abort without controller_module_init

When loading a controller module, if we do not find a
controller_module_init symbol, return failure to the caller instead of
ignoring the failure.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
dev
Pekka Paalanen 10 years ago
parent 8a005252d1
commit 97246c067d
  1. 4
      ivi-shell/ivi-layout.c

@ -2953,7 +2953,9 @@ load_controller_modules(struct weston_compositor *compositor, const char *module
snprintf(buffer, sizeof buffer, "%.*s", (int)(end - p), p);
controller_module_init = weston_load_module(buffer, "controller_module_init");
if (controller_module_init)
if (!controller_module_init)
return -1;
if (controller_module_init(compositor, argc, argv,
&ivi_controller_interface,
sizeof(struct ivi_controller_interface)) != 0) {

Loading…
Cancel
Save