gpio: use (!foo) instead of (foo == NULL)