ctrl = BP10G_READ_REG(pbpctl_dev, ESDP);
if (pbpctl_dev->bp_10g9) {
- if (!(pbpctl_dev_c = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_c = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_c)
return;
ctrl = BP10G_READ_REG(pbpctl_dev_c, ESDP);
}
if (pbpctl_dev->bp_540)
ctrl = BP10G_READ_REG(pbpctl_dev, ESDP);
if (pbpctl_dev->bp_10g9) {
- if (!(pbpctl_dev_c = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_c = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_c)
return -1;
ctrl = BP10G_READ_REG(pbpctl_dev_c, ESDP);
}
bpctl_dev_t *pbpctl_dev_c = NULL;
unsigned long flags;
if (pbpctl_dev->bp_10g9) {
- if (!(pbpctl_dev_c = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_c = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_c)
return;
}
if ((pbpctl_dev->wdt_status == WDT_STATUS_EN) &&
atomic_set(&pbpctl_dev->wdt_busy, 1);
#endif
if (pbpctl_dev->bp_10g9) {
- if (!(pbpctl_dev_c = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_c = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_c)
return -1;
}
return -1;
#endif
if (pbpctl_dev->bp_10g9) {
- if (!(pbpctl_dev_c = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_c = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_c)
return -1;
}
{
bpctl_dev_t *pbpctl_dev_b = NULL;
- if (!(pbpctl_dev_b = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_b)
return -1;
atomic_set(&pbpctl_dev->wdt_busy, 1);
write_data_port_int(pbpctl_dev, value & 0x3);
int ret = 0, ctrl = 0;
bpctl_dev_t *pbpctl_dev_b = NULL;
- if (!(pbpctl_dev_b = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_b)
return BP_NOT_CAP;
if (pbpctl_dev->bp_caps_ex & TPL2_CAP_EX) {
int ret = 0, ctrl = 0;
bpctl_dev_t *pbpctl_dev_b = NULL;
- if (!(pbpctl_dev_b = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_b)
return BP_NOT_CAP;
if (pbpctl_dev->bp_caps_ex & TPL2_CAP_EX) {
cmnd_on(pbpctl_dev);
uint32_t ctrl_ext = 0;
bpctl_dev_t *pbpctl_dev_b = NULL;
- if ((pbpctl_dev->bp_caps & SW_CTL_CAP)
- && (pbpctl_dev_b = get_status_port_fn(pbpctl_dev))) {
+ if (pbpctl_dev->bp_caps & SW_CTL_CAP) {
+ pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_b)
+ return BP_NOT_CAP;
ctrl_ext = BPCTL_READ_REG(pbpctl_dev_b, CTRL_EXT);
BPCTL_BP_WRITE_REG(pbpctl_dev_b, CTRL_EXT,
(ctrl_ext & ~BPCTLI_CTRL_EXT_SDP7_DIR));
{
bpctl_dev_t *pbpctl_dev_b = NULL;
- if ((pbpctl_dev->bp_caps & SW_CTL_CAP)
- && (pbpctl_dev_b = get_status_port_fn(pbpctl_dev))) {
-
+ if (pbpctl_dev->bp_caps & SW_CTL_CAP) {
+ pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_b)
+ return BP_NOT_CAP;
send_bypass_clear_pulse(pbpctl_dev_b, 1);
return 0;
} else
bpctl_dev_t *pbpctl_dev_b = NULL;
- if (!(pbpctl_dev_b = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_b)
return BP_NOT_CAP;
if (INTEL_IF_SERIES(pbpctl_dev->subdevice)) {
if (pbpctl_dev->bp_caps & TAP_CAP) {
bpctl_dev_t *pbpctl_dev_b = NULL;
- if (!(pbpctl_dev_b = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_b)
return BP_NOT_CAP;
if (pbpctl_dev->bp_ext_ver >= 0x8) {
u32 ctrl_ext = 0;
if (pbpctl_dev->bp_caps & DISC_CAP) {
- if (!(pbpctl_dev_b = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_b)
return BP_NOT_CAP;
if (DISCF_IF_SERIES(pbpctl_dev->subdevice))
return ((((read_reg(pbpctl_dev, STATUS_DISC_REG_ADDR)) &
{
int ctrl = 0;
if (pbpctl_dev->bp_caps & DISC_CAP) {
-
- if ((ctrl = disc_off_status(pbpctl_dev)) < 0)
+ ctrl = disc_off_status(pbpctl_dev);
+ if (ctrl < 0)
return ctrl;
return ((ctrl == 0) ? 1 : 0);
-
}
return BP_NOT_CAP;
}
{
bpctl_dev_t *pbpctl_dev_b = NULL;
- if (!(pbpctl_dev_b = get_status_port_fn(pbpctl_dev)))
+ pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
+ if (!pbpctl_dev_b)
return BP_NOT_CAP;
if (TPL_IF_SERIES(pbpctl_dev->subdevice))