summaryrefslogtreecommitdiffstats
path: root/sys/dev/smbus/smb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/smbus/smb.c')
-rw-r--r--sys/dev/smbus/smb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c
index df3ebe9..579204d 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))))
OpenPOWER on IntegriCloud