diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2009-02-03 16:14:37 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2009-02-03 16:14:37 +0000 |
| commit | bb6bb7fe1b631c51bbd276d09f925fdba70dd585 (patch) | |
| tree | 9aca21032933c973a3881f8f79e208911283bc2c /sys/dev/smbus/smb.c | |
| parent | c96a3b833fac51f31291ede2ca8b28b0ebb19a25 (diff) | |
Notes
Diffstat (limited to 'sys/dev/smbus/smb.c')
| -rw-r--r-- | sys/dev/smbus/smb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c index df3ebe95b3ca..579204d1a04c 100644 --- a/sys/dev/smbus/smb.c +++ b/sys/dev/smbus/smb.c @@ -180,6 +180,10 @@ smbioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *t parent = device_get_parent(smbdev); + /* Make sure that LSB bit is cleared. */ + if (s->slave & 0x1) + return (EINVAL); + /* Allocate the bus. */ if ((error = smbus_request_bus(parent, smbdev, (flags & O_NONBLOCK) ? SMB_DONTWAIT : (SMB_WAIT | SMB_INTR)))) |
