From patchwork Wed Nov 11 12:15:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikulas Patocka X-Patchwork-Id: 7595651 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 D5AABBF90C for ; Wed, 11 Nov 2015 12:15:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 661D0206AC for ; Wed, 11 Nov 2015 12:15:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85938206B7 for ; Wed, 11 Nov 2015 12:15:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752296AbbKKMPH (ORCPT ); Wed, 11 Nov 2015 07:15:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58022 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbbKKMPF (ORCPT ); Wed, 11 Nov 2015 07:15:05 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id A40CA8EFDA; Wed, 11 Nov 2015 12:15:05 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tABCF4Y2011589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 11 Nov 2015 07:15:05 -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 tABCF4mh019683; Wed, 11 Nov 2015 07:15:04 -0500 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id tABCF41S019679; Wed, 11 Nov 2015 07:15:04 -0500 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Wed, 11 Nov 2015 07:15:04 -0500 (EST) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Nicholas Bellinger , Greg Kroah-Hartman , stable@vger.kernel.org cc: Martin Svec , Alex Gorbachev , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Subject: [PATCH 4.1 v2] target-core: fix return without a value In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 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. This patch has no upstream equivalent because the patch 35afa656 that introduced this bug has also no upstream equivalent. The code in upstream was already refactored, so neither 35afa656 nor this patch is needed there. Signed-off-by: Mikulas Patocka --- drivers/target/target_core_pr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) k -- 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]; /*