[PATCH] dm-bufio: code cleanup - return NULL, not b

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A small code cleanup - return NULL instead of b (although b is NULL at
this point). This function is not returning pointer to the buffer, it is
returning pointer to bufffer's data, thus it makes no sense to return the
variable b.

Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>

Index: linux-4.4-rc2/drivers/md/dm-bufio.c
===================================================================
--- linux-4.4-rc2.orig/drivers/md/dm-bufio.c
+++ linux-4.4-rc2/drivers/md/dm-bufio.c
@@ -1068,7 +1068,7 @@ static void *new_read(struct dm_bufio_cl
 	__flush_write_list(&write_list);
 
 	if (!b)
-		return b;
+		return NULL;
 
 	if (need_submit)
 		submit_io(b, READ, b->block, read_endio);

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux