From patchwork Tue Nov 10 18:32:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikulas Patocka X-Patchwork-Id: 7591861 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D3739BF90C for ; Tue, 10 Nov 2015 18:32:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 132B52042A for ; Tue, 10 Nov 2015 18:32:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3187F2041B for ; Tue, 10 Nov 2015 18:32:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752029AbbKJScP (ORCPT ); Tue, 10 Nov 2015 13:32:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45032 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535AbbKJScN (ORCPT ); Tue, 10 Nov 2015 13:32:13 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 482803FE9E; Tue, 10 Nov 2015 18:32:13 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAAIWCQt015260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Nov 2015 13:32:12 -0500 Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id tAAIWB3V021048; Tue, 10 Nov 2015 13:32:11 -0500 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id tAAIWAau021044; Tue, 10 Nov 2015 13:32:10 -0500 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Tue, 10 Nov 2015 13:32:10 -0500 (EST) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Nicholas Bellinger , Greg Kroah-Hartman , linux-stable@vger.kernel.org cc: Martin Svec , Alex Gorbachev , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Subject: [PATCH 4.1] target-core: fix return without a value Message-ID: User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/target/target_core_pr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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]; /*