aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/via-ircc.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-24 01:52:47 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-24 01:52:47 -0400
commit23930fa1cebfea6f79881c588ccd1b0781e49e3f (patch)
tree36d29e3f83661c4f5f45b6f74ac0d5f9886867a8 /drivers/net/irda/via-ircc.c
parent36b35a5be0e4b406acd816e2122d153e875105be (diff)
parent4f5537de7c1531398e84e18a24f667e49cc94208 (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/net/irda/via-ircc.c')
-rw-r--r--drivers/net/irda/via-ircc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index 8bafb455c102..79b85f327500 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -279,7 +279,7 @@ static void via_ircc_clean(void)
279 279
280 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 280 IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
281 281
282 for (i=0; i < 4; i++) { 282 for (i=0; i < ARRAY_SIZE(dev_self); i++) {
283 if (dev_self[i]) 283 if (dev_self[i])
284 via_ircc_close(dev_self[i]); 284 via_ircc_close(dev_self[i]);
285 } 285 }
@@ -327,6 +327,9 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id)
327 327
328 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 328 IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
329 329
330 if (i >= ARRAY_SIZE(dev_self))
331 return -ENOMEM;
332
330 /* Allocate new instance of the driver */ 333 /* Allocate new instance of the driver */
331 dev = alloc_irdadev(sizeof(struct via_ircc_cb)); 334 dev = alloc_irdadev(sizeof(struct via_ircc_cb));
332 if (dev == NULL) 335 if (dev == NULL)