[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171013162900.16911-1-colin.king@canonical.com>
Date: Fri, 13 Oct 2017 17:29:00 +0100
From: Colin King <colin.king@...onical.com>
To: Ganesh Goudar <ganeshgr@...lsio.com>, netdev@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][net-next] cxgb4: fix missing break in switch and indent return statements
From: Colin Ian King <colin.king@...onical.com>
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: 96ac18f14a5a ("cxgb4: Add support for new flash parts")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index b3fd1f457639..fe7db70a9fa6 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -8289,7 +8289,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;
}
@@ -8308,8 +8308,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
@@ -8326,7 +8327,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;
}
--
2.14.1
Powered by blists - more mailing lists