gpio: fix line flag validation in linehandle_create