Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] easycap: fix warnings: variable set but not used

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Tomas Winkler and committed by
Mauro Carvalho Chehab
a6ff0a06 0b217d21

+9 -11
+7 -3
drivers/staging/media/easycap/easycap_low.c
··· 468 468 /****************************************************************************/ 469 469 int setup_saa(struct usb_device *p, bool ntsc) 470 470 { 471 - int i, ir; 471 + int i, rc; 472 472 const struct saa7113config *cfg; 473 473 if (!p) 474 474 return -ENODEV; 475 475 cfg = (ntsc) ? saa7113configNTSC : saa7113configPAL; 476 - for (i = 0; cfg[i].reg != 0xFF; i++) 477 - ir = write_saa(p, cfg[i].reg, cfg[i].set); 476 + for (i = 0; cfg[i].reg != 0xFF; i++) { 477 + rc = write_saa(p, cfg[i].reg, cfg[i].set); 478 + if (rc) 479 + dev_err(&p->dev, 480 + "Failed to set SAA register %d", cfg[i].reg); 481 + } 478 482 return 0; 479 483 } 480 484 /****************************************************************************/
+1 -6
drivers/staging/media/easycap/easycap_main.c
··· 1199 1199 * WHEN BOOLEAN PARAMETER decimatepixel IS true, ONLY THE FIELD FOR WHICH 1200 1200 * odd==false IS TRANSFERRED TO THE FRAME BUFFER. 1201 1201 * 1202 - * THE BOOLEAN PARAMETER offerfields IS true ONLY WHEN THE USER PROGRAM 1203 - * CHOOSES THE OPTION V4L2_FIELD_INTERLACED. 1204 1202 */ 1205 1203 /*---------------------------------------------------------------------------*/ 1206 1204 static int field2frame(struct easycap *peasycap) ··· 1210 1212 int rc, bytesperpixel, multiplier; 1211 1213 int much, more, over, rump, caches, input; 1212 1214 u8 mask, margin; 1213 - bool odd, isuy, decimatepixel, offerfields, badinput; 1215 + bool odd, isuy, decimatepixel, badinput; 1214 1216 1215 1217 if (!peasycap) { 1216 1218 SAY("ERROR: peasycap is NULL\n"); ··· 1226 1228 peasycap->field_buffer[peasycap->field_read][0].input, 1227 1229 peasycap->field_read, peasycap->frame_fill); 1228 1230 JOM(8, "===== %i=bytesperpixel\n", peasycap->bytesperpixel); 1229 - if (peasycap->offerfields) 1230 - JOM(8, "===== offerfields\n"); 1231 1231 1232 1232 /*---------------------------------------------------------------------------*/ 1233 1233 /* ··· 1247 1251 #endif /*EASYCAP_TESTCARD*/ 1248 1252 /*---------------------------------------------------------------------------*/ 1249 1253 1250 - offerfields = peasycap->offerfields; 1251 1254 bytesperpixel = peasycap->bytesperpixel; 1252 1255 decimatepixel = peasycap->decimatepixel; 1253 1256
+1 -2
drivers/staging/media/easycap/easycap_sound.c
··· 592 592 static int easycap_alsa_trigger(struct snd_pcm_substream *pss, int cmd) 593 593 { 594 594 struct easycap *peasycap; 595 - int retval; 596 595 597 596 JOT(4, "%i=cmd cf %i=START %i=STOP\n", cmd, SNDRV_PCM_TRIGGER_START, 598 597 SNDRV_PCM_TRIGGER_STOP); ··· 614 615 break; 615 616 } 616 617 default: 617 - retval = -EINVAL; 618 + return -EINVAL; 618 619 } 619 620 return 0; 620 621 }