fs: Fix can_lseek_backward()
To quote corresponding man page:

"... Upon successful completion, lseek() returns the resulting offset
location as measured in bytes from the beginning of the file."

Which for lseek(fd, 0, SEEK_SET) would be 0, so returning 'ret' as
final step of the function would mean it'd never return anything but 0
as well. Change the code to explicitly return '1' to fix the problem.

Fixes: 7c3f8d366 ("uimage: fix: add can_lseek_backward and use in uimage_open")
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 80c2876 commit 3f2df4e92a8b68760e8e4f3c481cce88bd0bd082
@Andrey Smirnov Andrey Smirnov authored on 15 Nov 2017
Sascha Hauer committed on 17 Nov 2017
Showing 1 changed file
View
include/fs.h