On Mon Jul 20 10:54:33 2026 +0800, Lei Huang wrote:
> Fix all 5 'CHECK: braces {} should be used on all arms of this statement'
> issues reported by checkpatch.pl in s2255drv.c. Add braces to else and
> else-if branches that were missing them for consistency with other
> branches.
> 
> Signed-off-by: Lei Huang <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/usb/s2255/s2255drv.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

---

diff --git a/drivers/media/usb/s2255/s2255drv.c 
b/drivers/media/usb/s2255/s2255drv.c
index 78011f5fe99c..a759ba9a6d51 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -534,8 +534,9 @@ static void s2255_fwchunk_complete(struct urb *urb)
                        return;
                }
                data->fw_loaded += len;
-       } else
+       } else {
                atomic_set(&data->fw_state, S2255_FW_LOADED_DSPWAIT);
+       }
        return;
 
 }
@@ -839,8 +840,9 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void 
*priv,
                                mode.scale = SCALE_4CIFSI;
                        else
                                mode.scale = SCALE_4CIFS;
-               } else
+               } else {
                        mode.scale = SCALE_2CIFS;
+               }
 
        } else {
                mode.scale = SCALE_1CIFS;
@@ -1122,8 +1124,9 @@ static int vidioc_s_std(struct file *file, void *priv, 
v4l2_std_id i)
                        vc->width = LINE_SZ_4CIFS_PAL;
                        vc->height = NUM_LINES_4CIFS_PAL * 2;
                }
-       } else
+       } else {
                return -EINVAL;
+       }
        vc->std = i;
        if (mode.restart)
                s2255_set_mode(vc, &mode);
@@ -1306,11 +1309,11 @@ static int vidioc_s_parm(struct file *file, void *priv,
                return -EBUSY;
        def_num = (mode.format == FORMAT_NTSC) ? 1001 : 1000;
        def_dem = (mode.format == FORMAT_NTSC) ? 30000 : 25000;
-       if (def_dem != sp->parm.capture.timeperframe.denominator)
+       if (def_dem != sp->parm.capture.timeperframe.denominator) {
                sp->parm.capture.timeperframe.numerator = def_num;
-       else if (sp->parm.capture.timeperframe.numerator <= def_num)
+       } else if (sp->parm.capture.timeperframe.numerator <= def_num) {
                sp->parm.capture.timeperframe.numerator = def_num;
-       else if (sp->parm.capture.timeperframe.numerator <= (def_num * 2)) {
+       } else if (sp->parm.capture.timeperframe.numerator <= (def_num * 2)) {
                sp->parm.capture.timeperframe.numerator = def_num * 2;
                fdec = FDEC_2;
        } else if (sp->parm.capture.timeperframe.numerator <= (def_num * 3)) {
@@ -2058,9 +2061,9 @@ static void read_pipe_completion(struct urb *purb)
                return;
        }
 
-       if (status == 0)
+       if (status == 0) {
                s2255_read_video_callback(dev, pipe_info);
-       else {
+       } else {
                pipe_info->err_count++;
                dprintk(dev, 1, "%s: failed URB %d\n", __func__, status);
        }
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to