local: ignore "permission denied" error on accessing watermark
local: ignore "permission denied" error on accessing watermark

The watermark attribute may be set to read-only by the kernel. In that
case, trying to open it for writing will return -EACCES, aka.
"permission denied".

Therefore, the -EACCES error needs to be ignored. This is a bit
annoying, since we cannot know if it happens because the attribute
itself was set read-only by the kernel, or because the user simply
doesn't have the necesary access rights to write the file. But it is
rather safe to assume it is not the latter, as the "buffer/length"
attribute was written just a bit before without returning an error.

Signed-off-by: Paul Cercueil <a027184a55211cd23e3f3094f1fdc728df5e0500@crapouillou.net>

analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio