Przeglądaj źródła

[media] s2255drv: avoid a switch fall through

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>
Mauro Carvalho Chehab 8 lat temu
rodzic
commit
ec33fbd585
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      drivers/media/usb/s2255/s2255drv.c

+ 2 - 0
drivers/media/usb/s2255/s2255drv.c

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