Tim, this will fix the kfree_s warning you were getting with the lp
driver. LP_IRQ(minor) is -1 when there is no IRQ now, rather than 0, and
so just testing for it being non-zero isn't enough. (I *thought* all
those tests were changed, but this one obviously slipped through the
net...)
Tim.
*/
--- linux/drivers/char/lp.c~ Tue May 27 02:11:40 1997
+++ linux/drivers/char/lp.c Tue May 27 02:28:05 1997
@@ -501,9 +501,8 @@
static int lp_release(struct inode * inode, struct file * file)
{
unsigned int minor = MINOR(inode->i_rdev);
- unsigned int irq;
- if ((irq = LP_IRQ(minor))) {
+ if (LP_IRQ(minor) > 0) {
kfree_s(lp_table[minor].lp_buffer, LP_BUFFER_SIZE);
lp_table[minor].lp_buffer = NULL;
}