mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-26 20:38:20 +00:00
Fixed the i2c-dev unconnected devices Oops
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@369 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
389cc3f3ff
commit
4e5e1093de
1 file changed
+1
-1
+1
-1
@@ -349,7 +349,7 @@ int i2cdev_open (struct inode *inode, struct file *file)
|
|||||||
unsigned int minor = MINOR(inode->i_rdev);
|
unsigned int minor = MINOR(inode->i_rdev);
|
||||||
struct i2c_client *client;
|
struct i2c_client *client;
|
||||||
|
|
||||||
if (! i2cdev_clients[minor]) {
|
if ((minor >= I2CDEV_CLIENTS_MAX) || ! (i2cdev_clients[minor])) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printk("i2c-dev.o: Trying to open unattached adapter i2c-%d\n",minor);
|
printk("i2c-dev.o: Trying to open unattached adapter i2c-%d\n",minor);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user