]> git.baikalelectronics.ru Git - kernel.git/commit
sysfs: return correct error code on unimplemented mmap()
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Wed, 30 Oct 2013 12:08:32 +0000 (14:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Oct 2013 17:21:39 +0000 (10:21 -0700)
commit6682af39a67dfa41b9257480f3a51d8d17f53b47
tree088b98186e167393f597de9844977955ab45488f
parent175a1ecce283e8f25f6411be796b341e4e8d8cba
sysfs: return correct error code on unimplemented mmap()

Both POSIX.1-2008 and Linux Programmer's Manual have a dedicated return
error code for a case, when a file doesn't support mmap(), it's ENODEV.

This change replaces overloaded EINVAL with ENODEV in a situation
described above for sysfs binary files.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/file.c