{
bcmsdh_info_t *bcmsdh;
- if ((bcmsdh =
- (bcmsdh_info_t *) MALLOC(osh, sizeof(bcmsdh_info_t))) == NULL) {
+ bcmsdh = (bcmsdh_info_t *) MALLOC(osh, sizeof(bcmsdh_info_t));
+ if (bcmsdh == NULL) {
BCMSDH_ERROR(("bcmsdh_attach: out of memory, "
"malloced %d bytes\n", MALLOCED(osh)));
return NULL;
/* save the handler locally */
l_bcmsdh = bcmsdh;
- if (!(bcmsdh->sdioh = sdioh_attach(osh, cfghdl, irq))) {
+ bcmsdh->sdioh = sdioh_attach(osh, cfghdl, irq);
+ if (!bcmsdh->sdioh) {
bcmsdh_detach(osh, bcmsdh);
return NULL;
}
if (ascii) {
/* Move binary bits to tmp and format them
into the provided buffer. */
- if ((tmp_buf = (uint8 *) MALLOC(bcmsdh->osh, length)) == NULL) {
+ tmp_buf = (uint8 *) MALLOC(bcmsdh->osh, length);
+ if (tmp_buf == NULL) {
BCMSDH_ERROR(("%s: out of memory\n", __func__));
return BCME_NOMEM;
}
ASSERT(bcmsdh->init_success);
if (bar0 != bcmsdh->sbwad) {
- if ((err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0)))
+ err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
+ if (err)
return err;
bcmsdh->sbwad = bar0;
return BCME_UNSUPPORTED;
if (bar0 != bcmsdh->sbwad) {
- if ((err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0)))
+ err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
+ if (err)
return err;
bcmsdh->sbwad = bar0;
return BCME_UNSUPPORTED;
if (bar0 != bcmsdh->sbwad) {
- if ((err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0)))
+ err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
+ if (err)
return err;
bcmsdh->sbwad = bar0;