X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fstallion.c;h=95af2a941595517ca0ea30daa4a380a739724475;hb=f9c5d0451b406a6bd0d0bf1fdd63c7777af6ebc6;hp=951545a6ef2d3f4c63a6f8c372fcbe88bbbdb277;hpb=54522b6613a03807f057fd567794a31267ef85cb;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 951545a6ef2..95af2a94159 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -785,8 +785,7 @@ static void __exit stallion_module_exit(void) "errno=%d\n", -i); class_destroy(stallion_class); - if (stl_tmpwritebuf != (char *) NULL) - kfree(stl_tmpwritebuf); + kfree(stl_tmpwritebuf); for (i = 0; (i < stl_nrbrds); i++) { if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) @@ -804,8 +803,7 @@ static void __exit stallion_module_exit(void) continue; if (portp->tty != (struct tty_struct *) NULL) stl_hangup(portp->tty); - if (portp->tx.buf != (char *) NULL) - kfree(portp->tx.buf); + kfree(portp->tx.buf); kfree(portp); } kfree(panelp); @@ -3095,7 +3093,9 @@ static int __init stl_init(void) devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), S_IFCHR|S_IRUSR|S_IWUSR, "staliomem/%d", i); - class_device_create(stallion_class, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i); + class_device_create(stallion_class, NULL, + MKDEV(STL_SIOMEMMAJOR, i), NULL, + "staliomem%d", i); } stl_serial->owner = THIS_MODULE;