lights: Put back fd checks before closing
authorChristopher N. Hesse <raymanfx@gmail.com>
Wed, 5 Apr 2017 16:55:28 +0000 (18:55 +0200)
committerChristopher N. Hesse <raymanfx@gmail.com>
Wed, 5 Apr 2017 16:58:09 +0000 (18:58 +0200)
commite37aedde2e7f2afa69ac63bdfc80cc103b19469d
tree97f2f762f6406dd43a9b8675526fc5a586df4108
parent235c2987671222299042c7d920f83e21c7632ebb
lights: Put back fd checks before closing

While close(NULL) is indeed a harmless noop, fd can
end up being < 0 for us.

Change-Id: I56dcd7fb61c72d3ce750b13329ff42e11ab63c84
liblights/lights_helper.c