local.c: Fix channel attributes when only shared attributes exist

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>