* [PATCH 1/2] qlcnic: Add default swtich case in 'qlcnic_can_start_firmware()'
@ 2012-04-09 5:59 santosh nayak
2012-04-12 20:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: santosh nayak @ 2012-04-09 5:59 UTC (permalink / raw)
To: anirban.chakraborty, rajesh.borundia
Cc: sony.chacko, linux-driver, netdev, kernel-janitors, Santosh Nayak
From: Santosh Nayak <santoshprasadnayak@gmail.com>
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] qlcnic: Add default swtich case in 'qlcnic_can_start_firmware()'
2012-04-09 5:59 [PATCH 1/2] qlcnic: Add default swtich case in 'qlcnic_can_start_firmware()' santosh nayak
@ 2012-04-12 20:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-04-12 20:02 UTC (permalink / raw)
To: santoshprasadnayak
Cc: anirban.chakraborty, rajesh.borundia, sony.chacko, linux-driver,
netdev, kernel-janitors
You haven't told me what tree these two patches should be applied to,
so I am dropping them both.
Resubmit with a proper destination tree indication.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-12 20:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 5:59 [PATCH 1/2] qlcnic: Add default swtich case in 'qlcnic_can_start_firmware()' santosh nayak
2012-04-12 20:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).