Re: [PATCH v2] block: Fix uninitialized symbol 'bio' in blk_rq_prep_clone

From: Christoph Hellwig
Date: Tue Oct 08 2024 - 00:23:28 EST


On Tue, Oct 08, 2024 at 01:28:36AM +0530, SurajSonawane2415 wrote:
> Fix the uninitialized symbol 'bio' in the function blk_rq_prep_clone
> to resolve the following error:
> block/blk-mq.c:3199 blk_rq_prep_clone() error: uninitialized symbol 'bio'.

Jens' comment baout the commit logs apply here as well. Otherwise
this looks much better than the first version, but please also move
the bio variable into the loop scope while you're at it, which also
removes the need to clear it to NULL at the end of the loop.