summaryrefslogtreecommitdiffstats
path: root/drivers/char/synclink_gt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/synclink_gt.c')
-rw-r--r--drivers/char/synclink_gt.c4
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)
*/
rbuf_fill_level = ((unsigned int)enable) >> 16;
if (rbuf_fill_level) {
- if ((rbuf_fill_level > DMABUFSIZE) || (rbuf_fill_level % 4))
+ if ((rbuf_fill_level > DMABUFSIZE) || (rbuf_fill_level % 4)) {
+ spin_unlock_irqrestore(&info->lock, flags);
return -EINVAL;
+ }
info->rbuf_fill_level = rbuf_fill_level;
rx_stop(info); /* restart receiver to use new fill level */
}