netfs: fix uninitilalized value in ret being returned
Subsystems (2)
PATCH 1/1 netfs: fix uninitilalized value in ret being returned
In the case where sync is not true the variable ret not being set and a garbage value is being returned. Fix this by ensuring ret is initialized to 0.
Fixes c19a5d31b470 ("netfs: Add a function to consolidate beginning a read")
Signed-off-by Colin Ian King <[email protected]>
--- fs/netfs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/netfs/io.c +1 -1
@@ -601,7 +601,7 @@ static bool netfs_rreq_submit_slice(struct netfs_io_request *rreq,int netfs_begin_read (struct netfs_io_request *rreq,bool sync) {unsigned int debug_index =0 ; -int ret; +int ret =0 ;_enter ("R=%x %llx-%llx" , rreq->debug_id, rreq->start, rreq->start + rreq->len -1 );
Signature · 1 line
2.34.1