pwm.c: check error condition when doing read operations
pwm.c: check error condition when doing read operations

Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

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