opencl_write_kernel_file: add error handling
commit316758a93c013b27e1604be477bd8b86076eed04
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 16 Oct 2014 14:54:01 +0000 (16 16:54 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 16 Oct 2014 15:04:47 +0000 (16 17:04 +0200)
tree295cc74ed31f24d219db840290b3a3c22912c425
parent15638254ea3c271c125e92aa0f81c7916745dc05
opencl_write_kernel_file: add error handling

If anything went wrong, then opencl->kprinter will be NULL and therefore
so will the result of isl_printer_get_str.
We cannot print a NULL string, so we return a failure condition instead.

Reported-by: Michael Kruse <MichaelKruse@meinersbur.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
opencl.c