From f98c8f797021e78ba27143ecd39c51995c47aa8b Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Mon, 23 Nov 2015 19:11:32 -0500 Subject: dm bufio: return NULL to improve code clarity A small code cleanup in new_read() - return NULL instead of b (although b is NULL at this point). This function is not returning pointer to the buffer, it is returning a pointer to the bufffer's data, thus it makes no sense to return the variable b. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer --- drivers/md/dm-bufio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/md/dm-bufio.c') diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 2dd33085b331..7734298bff3c 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -1068,7 +1068,7 @@ static void *new_read(struct dm_bufio_client *c, sector_t block, __flush_write_list(&write_list); if (!b) - return b; + return NULL; if (need_submit) submit_io(b, READ, b->block, read_endio); -- cgit v1.2.3