All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm-bufio: code cleanup - return NULL, not b
@ 2015-11-24  0:11 Mikulas Patocka
  0 siblings, 0 replies; only message in thread
From: Mikulas Patocka @ 2015-11-24  0:11 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: dm-devel

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@redhat.com>

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-24  0:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-24  0:11 [PATCH] dm-bufio: code cleanup - return NULL, not b Mikulas Patocka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.