gpio.c: free context if we fail to write to export

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
spi.c: check memory allocation for context was succesful

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
spi.c: fix identation

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>