summaryrefslogtreecommitdiff
path: root/drivers/s390/char
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2022-12-05 10:29:05 +0100
committerHeiko Carstens <hca@linux.ibm.com>2023-01-09 14:34:04 +0100
commit945775155e21097cacb60ed182f7eb348bb8ef24 (patch)
treee469ad52860c99541f0c152180836b0b603cf0c4 /drivers/s390/char
parenta82603b0d6ee393046e4d53f8708e02e12cf8a82 (diff)
downloadlwn-945775155e21097cacb60ed182f7eb348bb8ef24.tar.gz
lwn-945775155e21097cacb60ed182f7eb348bb8ef24.zip
s390/fs3270: add missing braces to if/else
Fix a few missing braces and wrong placement of braces reported by checkpatch. Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r--drivers/s390/char/fs3270.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c
index c354a294d59a..1b7df920ae10 100644
--- a/drivers/s390/char/fs3270.c
+++ b/drivers/s390/char/fs3270.c
@@ -181,8 +181,9 @@ fs3270_save_callback(struct raw3270_request *rq, void *data)
if (fp->fs_pid)
kill_pid(fp->fs_pid, SIGHUP, 1);
fp->rdbuf_size = 0;
- } else
+ } else {
fp->rdbuf_size = fp->rdbuf->size - rq->rescnt;
+ }
raw3270_request_reset(rq);
wake_up(&fp->wait);
}
@@ -274,8 +275,9 @@ fs3270_read(struct file *filp, char __user *data, size_t count, loff_t *off)
}
}
raw3270_request_free(rq);
- } else
+ } else {
rc = PTR_ERR(rq);
+ }
idal_buffer_free(ib);
return rc;
}
@@ -309,11 +311,13 @@ fs3270_write(struct file *filp, const char __user *data, size_t count, loff_t *o
rc = fs3270_do_io(&fp->view, rq);
if (rc == 0)
rc = count - rq->rescnt;
- } else
+ } else {
rc = -EFAULT;
+ }
raw3270_request_free(rq);
- } else
+ } else {
rc = PTR_ERR(rq);
+ }
idal_buffer_free(ib);
return rc;
}
@@ -538,8 +542,7 @@ static void fs3270_destroy_cb(int minor)
__unregister_chrdev(IBM_FS3270_MAJOR, minor, 1, "tub");
}
-static struct raw3270_notifier fs3270_notifier =
-{
+static struct raw3270_notifier fs3270_notifier = {
.create = fs3270_create_cb,
.destroy = fs3270_destroy_cb,
};