From d8dce5faf358a2f962f6239048fcc88a98e554ed Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Mon, 28 Dec 1998 15:50:25 +0000 Subject: [PATCH] fill_inode bug resolved This could lead to memory corruption and to the could-not-unload-module problem of earlier reports. With a little luck, this will resolve all module loading/unloading problems reported. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@132 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/sensors.c | 2 +- src/sensors.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sensors.c b/kernel/sensors.c index c1f550b9..20aad3c4 100644 --- a/kernel/sensors.c +++ b/kernel/sensors.c @@ -199,7 +199,7 @@ void sensors_deregister_entry(int id) kfree(table); sensors_entries[id] = NULL; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) - sensors_clients[id-256] = NULL; + sensors_clients[id] = NULL; #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */ } } diff --git a/src/sensors.c b/src/sensors.c index c1f550b9..20aad3c4 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -199,7 +199,7 @@ void sensors_deregister_entry(int id) kfree(table); sensors_entries[id] = NULL; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) - sensors_clients[id-256] = NULL; + sensors_clients[id] = NULL; #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */ } }