public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.1] target-core: fix return without a value
@ 2015-11-10 18:32 Mikulas Patocka
  2015-11-10 18:56 ` Greg Kroah-Hartman
  2015-11-11 12:15 ` [PATCH 4.1 v2] " Mikulas Patocka
  0 siblings, 2 replies; 6+ messages in thread
From: Mikulas Patocka @ 2015-11-10 18:32 UTC (permalink / raw)
  To: Nicholas Bellinger, Greg Kroah-Hartman, linux-stable
  Cc: Martin Svec, Alex Gorbachev, linux-scsi, target-devel

Fix the warning drivers/target/target_core_pr.c:332:3: warning: 'return'
with no value, in function returning non-void [-Wreturn-type]

The patch 35afa65642a9a88c81913377b93a3a66220f8b9d committed to 4.1.11
adds a check if device_list is NULL. The patch adds a return statement
without a value to the function core_scsi3_pr_seq_non_holder that returns
int.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
 drivers/target/target_core_pr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-4.1.13/drivers/target/target_core_pr.c
===================================================================
--- linux-4.1.13.orig/drivers/target/target_core_pr.c	2015-10-23 18:25:26.000000000 +0200
+++ linux-4.1.13/drivers/target/target_core_pr.c	2015-11-10 19:22:07.000000000 +0100
@@ -329,7 +329,7 @@ static int core_scsi3_pr_seq_non_holder(
 			 * RESERVATION CONFLICT on some CDBs */
 
 	if (!se_sess->se_node_acl->device_list)
-		return;
+		return -EINVAL;
 
 	se_deve = se_sess->se_node_acl->device_list[cmd->orig_fe_lun];
 	/*

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-11 12:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-10 18:32 [PATCH 4.1] target-core: fix return without a value Mikulas Patocka
2015-11-10 18:56 ` Greg Kroah-Hartman
2015-11-10 23:31   ` Mikulas Patocka
2015-11-11  0:00     ` Greg Kroah-Hartman
2015-11-11 12:06       ` Mikulas Patocka
2015-11-11 12:15 ` [PATCH 4.1 v2] " Mikulas Patocka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox