diff options
| author | Lei Huang <huanglei@kylinos.cn> | 2026-07-20 10:55:07 +0800 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-07-27 14:22:07 +0200 |
| commit | 5e62e53289f5a9fba98013bb4143e3277b254260 (patch) | |
| tree | 0adf10cc467543565884bfed346f4128aa9fa159 | |
| parent | 71bb625ce24adaf59f343182b8a592de86a6b39f (diff) | |
| download | linux-next-5e62e53289f5a9fba98013bb4143e3277b254260.tar.gz linux-next-5e62e53289f5a9fba98013bb4143e3277b254260.zip | |
media: s2255: Remove unnecessary braces from single-statement blocks
Fix all 4 'WARNING: braces {} are not necessary for single statement
blocks' issues reported by checkpatch.pl in s2255drv.c. Remove braces
from single-statement if blocks where they are not needed.
Signed-off-by: Lei Huang <huanglei@kylinos.cn>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
| -rw-r--r-- | drivers/media/usb/s2255/s2255drv.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index a9ed663cece4..c66cca2e76dd 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -1978,9 +1978,8 @@ static int s2255_board_init(struct s2255_dev *dev) pipe->transfer_buffer = kzalloc(pipe->max_transfer_size, GFP_KERNEL); - if (!pipe->transfer_buffer) { + if (!pipe->transfer_buffer) return -ENOMEM; - } /* query the firmware */ fw_ver = s2255_get_fx2fw(dev); @@ -2210,14 +2209,12 @@ static int s2255_probe(struct usb_interface *interface, /* allocate memory for our device state and initialize it to zero */ dev = kzalloc_obj(struct s2255_dev); - if (!dev) { + if (!dev) return -ENOMEM; - } dev->cmdbuf = kzalloc(S2255_CMDBUF_SIZE, GFP_KERNEL); - if (!dev->cmdbuf) { + if (!dev->cmdbuf) goto err_fwdata1; - } refcount_set(&dev->num_channels, 0); dev->pid = id->idProduct; @@ -2266,9 +2263,8 @@ static int s2255_probe(struct usb_interface *interface, goto err_fwurb; dev->fw_data->pfw_data = kzalloc(CHUNK_SIZE, GFP_KERNEL); - if (!dev->fw_data->pfw_data) { + if (!dev->fw_data->pfw_data) goto err_fwdata2; - } /* load the first chunk */ if (request_firmware(&dev->fw_data->fw, FIRMWARE_FILE_NAME, &dev->udev->dev)) { |
