Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11898
b: refs/heads/master
c: 9090e6d
h: refs/heads/master
v: v3
  • Loading branch information
Clemens Ladisch authored and Linus Torvalds committed Oct 31, 2005
1 parent ad1338b commit f5c7c44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 874ec33ff9ccf3651590697a2c2923b911bf31d0
refs/heads/master: 9090e6db87e3bdb2a2c187ebc0f9175a9f9e5c6f
5 changes: 4 additions & 1 deletion trunk/drivers/char/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp)
hpet = devp->hd_hpet;
hpetp = devp->hd_hpets;

if (!devp->hd_ireqfreq)
return -EIO;

v = readq(&timer->hpet_config);
spin_lock_irq(&hpet_lock);

Expand Down Expand Up @@ -516,7 +519,7 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel)
break;
}

if (arg & (arg - 1)) {
if (!arg || (arg & (arg - 1))) {
err = -EINVAL;
break;
}
Expand Down

0 comments on commit f5c7c44

Please sign in to comment.