lkml.org 
[lkml]   [1997]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [2.1.38] Removing modules.
Hi,

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;
}


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.036 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site