diff options
Diffstat (limited to 'drivers/char/sx.c')
-rw-r--r-- | drivers/char/sx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/sx.c b/drivers/char/sx.c index f146e90404fa..518f2a25d91e 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c | |||
@@ -1746,9 +1746,10 @@ static long sx_fw_ioctl(struct file *filp, unsigned int cmd, | |||
1746 | sx_dprintk(SX_DEBUG_FIRMWARE, "returning type= %ld\n", rc); | 1746 | sx_dprintk(SX_DEBUG_FIRMWARE, "returning type= %ld\n", rc); |
1747 | break; | 1747 | break; |
1748 | case SXIO_DO_RAMTEST: | 1748 | case SXIO_DO_RAMTEST: |
1749 | if (sx_initialized) /* Already initialized: better not ramtest the board. */ | 1749 | if (sx_initialized) { /* Already initialized: better not ramtest the board. */ |
1750 | rc = -EPERM; | 1750 | rc = -EPERM; |
1751 | break; | 1751 | break; |
1752 | } | ||
1752 | if (IS_SX_BOARD(board)) { | 1753 | if (IS_SX_BOARD(board)) { |
1753 | rc = do_memtest(board, 0, 0x7000); | 1754 | rc = do_memtest(board, 0, 0x7000); |
1754 | if (!rc) | 1755 | if (!rc) |
@@ -1788,7 +1789,7 @@ static long sx_fw_ioctl(struct file *filp, unsigned int cmd, | |||
1788 | nbytes - i : SX_CHUNK_SIZE)) { | 1789 | nbytes - i : SX_CHUNK_SIZE)) { |
1789 | kfree(tmp); | 1790 | kfree(tmp); |
1790 | rc = -EFAULT; | 1791 | rc = -EFAULT; |
1791 | break; | 1792 | goto out; |
1792 | } | 1793 | } |
1793 | memcpy_toio(board->base2 + offset + i, tmp, | 1794 | memcpy_toio(board->base2 + offset + i, tmp, |
1794 | (i + SX_CHUNK_SIZE > nbytes) ? | 1795 | (i + SX_CHUNK_SIZE > nbytes) ? |