gpio: use appropriate return values for cmd handler