From: Santosh Nayak <santoshprasadnayak@xxxxxxxxx> QLCRD32() may return bad state. Its good to have default switch case: 1. to avoid unexpected system behaviour. 2. to avoid extra computation thats happening after switch case. Signed-off-by: Santosh Nayak <santoshprasadnayak@xxxxxxxxx> --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 75c32e8..d30b9b8 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -2787,6 +2787,11 @@ qlcnic_can_start_firmware(struct qlcnic_adapter *adapter) case QLCNIC_DEV_INITIALIZING: case QLCNIC_DEV_QUISCENT: break; + + default: + dev_err(&adapter->pdev->dev, "Invalid state\n"); + qlcnic_api_unlock(adapter); + return -EINVAL; } qlcnic_api_unlock(adapter); -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html