pkg/units: Better to not use `error` as var name

Better to not use `error` as var name (might eclipse the error type) for
clarity and to prevent subtle bugs.

Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
Merge pull request #7164 from fcarriedo/not-error-as-var-name

pkg/units: Better to not use `error` as var name