generic: platform/mikrotik: rb_hardconfig.c minor fixes
authorThibaut VARÈNE <hacks@slashdirt.org>
Wed, 13 May 2020 16:42:45 +0000 (18:42 +0200)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Thu, 28 May 2020 09:09:10 +0000 (11:09 +0200)
commit39ec3c5986e5109c3f1dd63b27d884606453191b
tree11875d66c9f6f70e87f93faf7dbb69bc6df4bcea
parent429fbc96a4dbefaed82b22f93f504254a0b4cbe6
generic: platform/mikrotik: rb_hardconfig.c minor fixes

For the sake of strictly typed code, add a missing const qualifier.
Add a missing return value in error path.
Check the return value of mtd_read(), for good measure.
Also demote the error printks of failed sysfs file creation to warn
level since they are not fatal in the init() sequence.
Finally, add a note regarding PAGE_SIZE and clarify a comment.

Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c