gpio.c: check fd before attempting to use it
gpio.c: check fd before attempting to use it

mraa_gpio_wait_interrupt needs to check fd before using it

Signed-off-by: Jon Trulson <08664b19c2d4086eb239dd8ec32d593676a5b9e4@ics.com>
Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

whbruce/mraa,Propanu/mraa,w4ilun/mraa,neuroidss/mraa,neuroidss/mraa,arunlee77/mraa,Jon-ICS/mraa,timrtoo/Intel,alext-mkrs/mraa,sundw2014/mraa,alext-mkrs/mraa,sundw2014/mraa,spitfire88/mraa,noahchense/mraa,smileboywtu/mraa,alexandru-elisei/mraa,ncrastanaren/mraa,tripzero/mraa,alex1818/mraa,alexandru-elisei/mraa,ncrastanaren/mraa,seem-sky/mraa,petreeftime/mraa,ncrastanaren/mraa,stefan-andritoiu/mraa-gpio-chardev,jontrulson/mraa,malikabhi05/mraa,alex1818/mraa,anonymouse64/mraa,neuberfran/mraa,stefan-andritoiu/mraa,whbruce/mraa,Pillar1989/mraa,g-vidal/mraa,spitfire88/mraa,Pillar1989/mraa,whbruce/mraa,sundw2014/mraa,Hbrinj/mraa,jontrulson/mraa,smileboywtu/mraa,seem-sky/mraa,g-vidal/mraa,yongli3/mraa,KurtE/mraa,intel-iot-devkit/mraa,Jon-ICS/mraa,damcclos/mraa,jontrulson/mraa,mircea/mraa,Meirtz/mraa,Propanu/mraa,w4ilun/mraa,intel-iot-devkit/mraa,alext-mkrs/mraa,w4ilun/mraa,mircea/mraa,Propanu/mraa,stefan-andritoiu/mraa,allela-roy/mraa,arfoll/mraa,w4ilun/mraa,mircea/mraa,arfoll/mraa,nioinnovation/mraa,intel-iot-devkit/mraa,jontrulson/mraa,zBMNForks/mraa,anonymouse64/mraa,allela-roy/mraa,petreeftime/mraa,alex1818/mraa,noahchense/mraa,neuroidss/mraa,Hbrinj/mraa,whbruce/mraa,STANAPO/mraa,alext-mkrs/mraa,stefan-andritoiu/mraa,timrtoo/Intel,neuberfran/mraa,spitfire88/mraa,arfoll/mraa,arunlee77/mraa,stefan-andritoiu/mraa,petreeftime/mraa,arunlee77/mraa,andreivasiliu2211/mraa,seem-sky/mraa,arfoll/mraa,spitfire88/mraa,matt-auld/mraa,ProfFan/mraa,Hbrinj/mraa,malikabhi05/mraa,noahchense/mraa,nioinnovation/mraa,KurtE/mraa,sergev/mraa,Jon-ICS/mraa,matt-auld/mraa,SyrianSpock/mraa,malikabhi05/mraa,andreivasiliu2211/mraa,SyrianSpock/mraa,Propanu/mraa,sergev/mraa,Kiritoalex/mraa,yoyojacky/mraa,pctj101/mraa,sergev/mraa,KurtE/mraa,stefan-andritoiu/mraa-gpio-chardev,ProfFan/mraa,andreivasiliu2211/mraa,g-vidal/mraa,STANAPO/mraa,allela-roy/mraa,alexandru-elisei/mraa,smileboywtu/mraa,alext-mkrs/mraa,seem-sky/mraa,alexandru-elisei/mraa,g-vidal/mraa,ncrastanaren/mraa,malikabhi05/mraa,zBMNForks/mraa,timrtoo/Intel,ncrastanaren/mraa,zBMNForks/mraa,ProfFan/mraa,yongli3/mraa,stefan-andritoiu/mraa,stefan-andritoiu/mraa-gpio-chardev,stefan-andritoiu/mraa-gpio-chardev,STANAPO/mraa,Kiritoalex/mraa,neuberfran/mraa,pctj101/mraa,pctj101/mraa,intel-iot-devkit/mraa,damcclos/mraa,malikabhi05/mraa,noahchense/mraa,timrtoo/Intel,damcclos/mraa,yongli3/mraa,anonymouse64/mraa,pctj101/mraa,g-vidal/mraa,yoyojacky/mraa,andreivasiliu2211/mraa,yoyojacky/mraa,yongli3/mraa,Pillar1989/mraa,alexandru-elisei/mraa,KurtE/mraa,sundw2014/mraa,KurtE/mraa,arfoll/mraa,seem-sky/mraa,tripzero/mraa,Meirtz/mraa,intel-iot-devkit/mraa,neuberfran/mraa,Hbrinj/mraa,nioinnovation/mraa,stefan-andritoiu/mraa-gpio-chardev,sergev/mraa,sergev/mraa,Kiritoalex/mraa,arunlee77/mraa,matt-auld/mraa,sundw2014/mraa,Meirtz/mraa,yongli3/mraa,jontrulson/mraa,tripzero/mraa,noahchense/mraa,SyrianSpock/mraa,pctj101/mraa,petreeftime/mraa,ProfFan/mraa,Propanu/mraa,neuberfran/mraa,timrtoo/Intel