From owner-svn-src-all@freebsd.org Mon Mar 13 17:58:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 827E5D0A945; Mon, 13 Mar 2017 17:58:09 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FADC1CF6; Mon, 13 Mar 2017 17:58:09 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DHw8j8071841; Mon, 13 Mar 2017 17:58:08 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2DHw8NC071840; Mon, 13 Mar 2017 17:58:08 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201703131758.v2DHw8NC071840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 13 Mar 2017 17:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315205 - head/sys/dev/isci/scil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2017 17:58:09 -0000 Author: cem Date: Mon Mar 13 17:58:08 2017 New Revision: 315205 URL: https://svnweb.freebsd.org/changeset/base/315205 Log: scif_sas_controller: Fix inverted logic range check PR: 217742 Submitted by: Svyatoslav Sponsored by: Viva64 (PVS-Studio) Modified: head/sys/dev/isci/scil/scif_sas_controller.c Modified: head/sys/dev/isci/scil/scif_sas_controller.c ============================================================================== --- head/sys/dev/isci/scil/scif_sas_controller.c Mon Mar 13 17:53:46 2017 (r315204) +++ head/sys/dev/isci/scil/scif_sas_controller.c Mon Mar 13 17:58:08 2017 (r315205) @@ -528,7 +528,7 @@ SCI_STATUS scif_user_parameters_set( if (scif_parms->sas.is_sata_ncq_enabled != 1 && scif_parms->sas.is_sata_ncq_enabled != 0) return SCI_FAILURE_INVALID_PARAMETER_VALUE; - if (scif_parms->sas.max_ncq_depth < 1 && scif_parms->sas.max_ncq_depth > 32) + if (scif_parms->sas.max_ncq_depth < 1 || scif_parms->sas.max_ncq_depth > 32) return SCI_FAILURE_INVALID_PARAMETER_VALUE; if (scif_parms->sas.is_sata_standby_timer_enabled != 1