diff options
author | Paul Fulghum <paulkf@microgate.com> | 2008-07-22 06:23:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:03:29 -0400 |
commit | c68a99cda87a8356ea0e56cc5111043ac8402ffd (patch) | |
tree | 26ed5107f60a75868ef224f96872ba195af0c3e4 /drivers/char/synclink_gt.c | |
parent | 814dae031d08d40d34c0403a54d6e659baf0ae71 (diff) |
synclink_gt fix locking in error path of rx enable
Fix locking in error path of rx_enable() introduced by
synclink_gt-add-rx-dma-buffer-fill-level-control patch.
Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/synclink_gt.c')
-rw-r--r-- | drivers/char/synclink_gt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 5ffdb364ea40..3e9058993e41 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c | |||
@@ -2686,8 +2686,10 @@ static int rx_enable(struct slgt_info *info, int enable) | |||
2686 | */ | 2686 | */ |
2687 | rbuf_fill_level = ((unsigned int)enable) >> 16; | 2687 | rbuf_fill_level = ((unsigned int)enable) >> 16; |
2688 | if (rbuf_fill_level) { | 2688 | if (rbuf_fill_level) { |
2689 | if ((rbuf_fill_level > DMABUFSIZE) || (rbuf_fill_level % 4)) | 2689 | if ((rbuf_fill_level > DMABUFSIZE) || (rbuf_fill_level % 4)) { |
2690 | spin_unlock_irqrestore(&info->lock, flags); | ||
2690 | return -EINVAL; | 2691 | return -EINVAL; |
2692 | } | ||
2691 | info->rbuf_fill_level = rbuf_fill_level; | 2693 | info->rbuf_fill_level = rbuf_fill_level; |
2692 | rx_stop(info); /* restart receiver to use new fill level */ | 2694 | rx_stop(info); /* restart receiver to use new fill level */ |
2693 | } | 2695 | } |