Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
@@ -23,11 +23,11 @@
* Copyright 2008 NetXen, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
- * Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/debug.h>
@@ -702,11 +702,10 @@
rv = unm_nic_pci_get_crb_addr_2M(adapter, &off, len);
if (rv == -1) {
cmn_err(CE_PANIC, "%s: invalid offset: 0x%016llx\n",
__FUNCTION__, off);
- return (-1);
}
if (rv == 1) {
UNM_WRITE_LOCK_IRQS(&adapter->adapter_lock, flags);
crb_win_lock(adapter);
@@ -811,11 +810,10 @@
rv = unm_nic_pci_get_crb_addr_2M(adapter, &off, len);
if (rv == -1) {
cmn_err(CE_PANIC, "%s: invalid offset: 0x%016llx\n",
__FUNCTION__, off);
- return (-1);
}
if (rv == 1) {
UNM_WRITE_LOCK_IRQS(&adapter->adapter_lock, flags);
crb_win_lock(adapter);
@@ -951,11 +949,10 @@
if (ADDR_IN_RANGE(addr, UNM_ADDR_DDR_NET, UNM_ADDR_DDR_NET_MAX)) {
/* DDR network side */
/* MN access should never come here */
cmn_err(CE_PANIC, "%s\n", __FUNCTION__);
- addr = -1ULL;
} else if (ADDR_IN_RANGE(addr, UNM_ADDR_OCM0, UNM_ADDR_OCM0_MAX)) {
addr -= UNM_ADDR_OCM0;
addr += UNM_PCI_OCM0;
} else if (ADDR_IN_RANGE(addr, UNM_ADDR_OCM1, UNM_ADDR_OCM1_MAX)) {
addr -= UNM_ADDR_OCM1;