Forráskód Böngészése

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 <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Mikulas Patocka 9 éve
szülő
commit
f98c8f7970
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      drivers/md/dm-bufio.c

+ 1 - 1
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);
 	__flush_write_list(&write_list);
 
 
 	if (!b)
 	if (!b)
-		return b;
+		return NULL;
 
 
 	if (need_submit)
 	if (need_submit)
 		submit_io(b, READ, b->block, read_endio);
 		submit_io(b, READ, b->block, read_endio);