Fix use of uninitialized variable (err) in the tests

  .. and fix the end of test_clCreateKernelsInProgram.c