From: Andrew Morton <akpm@osdl.org>

- Fix

  drivers/atm/zatm.c: In function `zatm_start':
  drivers/atm/zatm.c:1342: warning: passing arg 1 of `kfree' makes pointer from integer without a cast

- Also, this function plays with the alignment of a pointer which it got
  from kmalloc, then kfrees the result.  The slab allocator will crash. 
  Switch it to BUG() is the alignment is wrong.

Cc: <chas@cmf.nrl.navy.mil>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/atm/zatm.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff -puN drivers/atm/zatm.c~zatm-kfree-fix drivers/atm/zatm.c
--- 25/drivers/atm/zatm.c~zatm-kfree-fix	2005-06-25 01:47:54.000000000 -0700
+++ 25-akpm/drivers/atm/zatm.c	2005-06-25 01:48:35.000000000 -0700
@@ -1309,8 +1309,7 @@ static int __init zatm_start(struct atm_
 				error = -ENOMEM;
 				goto out;
 			}
-			if ((here^(here+MBX_SIZE(i))) & ~0xffffUL)/* paranoia */
-				here = (here & ~0xffffUL)+0x10000;
+			BUG_ON((here^(here+MBX_SIZE(i))) & ~0xffffUL);
 			zatm_dev->mbx_start[i] = here;
 			if ((here^virt_to_bus((void *) here)) & 0xffff) {
 				printk(KERN_ERR DEV_LABEL "(itf %d): system "
@@ -1339,7 +1338,7 @@ static int __init zatm_start(struct atm_
 	return 0;
     out:
 	for (i = 0; i < NR_MBX; i++)
-		kfree(zatm_dev->mbx_start[i]);
+		kfree((void *)zatm_dev->mbx_start[i]);
 	kfree(zatm_dev->rx_map);
 	kfree(zatm_dev->tx_map);
 	free_irq(zatm_dev->irq, dev);
_