diff options
Diffstat (limited to 'drivers/char/ipmi/ipmi_watchdog.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_watchdog.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 77ece1f218cd..e71aaae855ad 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c | |||
@@ -657,19 +657,18 @@ static ssize_t ipmi_read(struct file *file, | |||
657 | 657 | ||
658 | static int ipmi_open(struct inode *ino, struct file *filep) | 658 | static int ipmi_open(struct inode *ino, struct file *filep) |
659 | { | 659 | { |
660 | switch (iminor(ino)) | 660 | switch (iminor(ino)) { |
661 | { | 661 | case WATCHDOG_MINOR: |
662 | case WATCHDOG_MINOR: | 662 | if (test_and_set_bit(0, &ipmi_wdog_open)) |
663 | if(test_and_set_bit(0, &ipmi_wdog_open)) | ||
664 | return -EBUSY; | 663 | return -EBUSY; |
665 | 664 | ||
666 | /* Don't start the timer now, let it start on the | 665 | /* Don't start the timer now, let it start on the |
667 | first heartbeat. */ | 666 | first heartbeat. */ |
668 | ipmi_start_timer_on_heartbeat = 1; | 667 | ipmi_start_timer_on_heartbeat = 1; |
669 | return nonseekable_open(ino, filep); | 668 | return nonseekable_open(ino, filep); |
670 | 669 | ||
671 | default: | 670 | default: |
672 | return (-ENODEV); | 671 | return (-ENODEV); |
673 | } | 672 | } |
674 | } | 673 | } |
675 | 674 | ||