[PATCH 3/3] staging/slicoss: return -ENODEV if no devid matches

From: Devendra Naga
Date: Mon Jul 09 2012 - 13:36:20 EST


if no case matches we are simply asserting and doing break.
and i think we may need to return that -ENODEV , no device is
present, rather assert'ing.

Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>
---
drivers/staging/slicoss/slicoss.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 5bd3825..56829fc 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -3746,8 +3746,7 @@ static u32 slic_card_locate(struct adapter *adapter)
rdhostid_offset = SLIC_RDHOSTID_1GB;
break;
default:
- ASSERT(0);
- break;
+ return -ENODEV;
}

hostid_reg =
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/