[media] s2255drv: avoid a switch fall through
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 19 May 2017 12:05:19 +0000 (09:05 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 19 May 2017 12:05:19 +0000 (09:05 -0300)
On this driver, it can fall through a switch. I tried to
annotate it, in order to shut up a gcc warning, but that
didn't work, as the logic there is somewhat complex.

So, instead, let's just repeat the code. gcc should likely
optimize it anyway, and this makes the code better readable,
IMHO.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/s2255/s2255drv.c

index a9d4484f7626ad4c92692d6e1853461c2efc695a..6a88b1dbb3a0d7c18acec303f6e6e51db75b8691 100644 (file)
@@ -1803,6 +1803,8 @@ static int save_frame(struct s2255_dev *dev, struct s2255_pipeinfo *pipe_info)
                                default:
                                        pr_info("s2255 unknown resp\n");
                                }
+                               pdata++;
+                               break;
                        default:
                                pdata++;
                                break;