Commit 5dc87425 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

cxgb4: fix missing break in switch and indent return statements

The break statement for the Macronix case is missing and will
fall through to the Winbond case and re-assign the size setting.
Fix this by adding the missing break statement.  Also correctly
indent the return statements.

Detected by CoverityScan, CID#1458020 ("Missing break in switch")

Fixes: 96ac18f1 ("cxgb4: Add support for new flash parts")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae96d333
......@@ -8404,7 +8404,7 @@ static int t4_get_flash_params(struct adapter *adap)
default:
dev_err(adap->pdev_dev, "Micron Flash Part has bad size, ID = %#x, Density code = %#x\n",
flashid, density);
return -EINVAL;
return -EINVAL;
}
break;
}
......@@ -8423,8 +8423,9 @@ static int t4_get_flash_params(struct adapter *adap)
default:
dev_err(adap->pdev_dev, "Macronix Flash Part has bad size, ID = %#x, Density code = %#x\n",
flashid, density);
return -EINVAL;
return -EINVAL;
}
break;
}
case 0xef: { /* Winbond */
/* This Density -> Size decoding table is taken from Winbond
......@@ -8441,7 +8442,7 @@ static int t4_get_flash_params(struct adapter *adap)
default:
dev_err(adap->pdev_dev, "Winbond Flash Part has bad size, ID = %#x, Density code = %#x\n",
flashid, density);
return -EINVAL;
return -EINVAL;
}
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment