Skip to contentSkip to conversation

pvrusb2: Variable set but not used

PATCH New Peter Senna Tschudin 1 participant 4 messages Jun 9, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 pvrusb2: Variable set but not used

In function pvr2_enum_input variable ret was set but not used. Tested by compilation only.

---
 drivers/media/video/pvrusb2/pvrusb2-v4l2.c |    2 --
 1 file changed, 2 deletions(-)
drivers/media/video/pvrusb2/pvrusb2-v4l2.c +0 -2
index 7bddfae..f1e0421 100644
@@ -226,13 +226,11 @@ static int pvr2_enum_input(struct file *file, void *priv, struct v4l2_input *vi)
 	struct v4l2_input tmp;
 	unsigned int cnt;
 	int val;
-	int ret;
 
 	cptr = pvr2_hdw_get_ctrl_by_id(hdw, PVR2_CID_INPUT);
 
 	memset(&tmp, 0, sizeof(tmp));
 	tmp.index = vi->index;
-	ret = 0;
 	if (vi->index >= fh->input_cnt)
 		return -EINVAL;
 	val = fh->input_map[vi->index];
Signature · 1 line
1.7.10.2
#1 lore raw

PATCH 2/4 pvrusb2: Variable set but not used

In function pvr2_queryctrl variable ret was set but not used. Tested by compilation only.

---
 drivers/media/video/pvrusb2/pvrusb2-v4l2.c |    2 --
 1 file changed, 2 deletions(-)
drivers/media/video/pvrusb2/pvrusb2-v4l2.c +0 -2
index f1e0421..aa0cf25 100644
@@ -554,9 +554,7 @@ static int pvr2_queryctrl(struct file *file, void *priv,
 	struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
 	struct pvr2_ctrl *cptr;
 	int val;
-	int ret;
 
-	ret = 0;
 	if (vc->id & V4L2_CTRL_FLAG_NEXT_CTRL) {
 		cptr = pvr2_hdw_get_ctrl_nextv4l(
 				hdw, (vc->id & ~V4L2_CTRL_FLAG_NEXT_CTRL));
Signature · 1 line
1.7.10.2
#2 lore raw

PATCH 3/4 pvrusb2: Variable set but not used

In reply to Peter Senna Tschudin

In function pvr2_try_ext_ctrls variable ret was set but not used. Tested by compilation only.

---
 drivers/media/video/pvrusb2/pvrusb2-v4l2.c |    2 --
 1 file changed, 2 deletions(-)
drivers/media/video/pvrusb2/pvrusb2-v4l2.c +0 -2
index aa0cf25..fc9c2ac 100644
@@ -701,11 +701,9 @@ static int pvr2_try_ext_ctrls(struct file *file, void *priv,
 	struct v4l2_ext_control *ctrl;
 	struct pvr2_ctrl *pctl;
 	unsigned int idx;
-	int ret;
 
 	/* For the moment just validate that the requested control
 	   actually exists. */
-	ret = 0;
 	for (idx = 0; idx < ctls->count; idx++) {
 		ctrl = ctls->controls + idx;
 		pctl = pvr2_hdw_get_ctrl_v4l(hdw, ctrl->id);
Signature · 1 line
1.7.10.2
#3 lore raw

PATCH 4/4 pvrusb2: Variable set but not used

In reply to Peter Senna Tschudin

In function pvr2_s_crop variable cap was set but not used. Tested by compilation only.

---
 drivers/media/video/pvrusb2/pvrusb2-v4l2.c |    2 --
 1 file changed, 2 deletions(-)
drivers/media/video/pvrusb2/pvrusb2-v4l2.c +0 -2
index fc9c2ac..cbe4080 100644
@@ -764,12 +764,10 @@ static int pvr2_s_crop(struct file *file, void *priv, struct v4l2_crop *crop)
 {
 	struct pvr2_v4l2_fh *fh = file->private_data;
 	struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
-	struct v4l2_cropcap cap;
 	int ret;
 
 	if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
 		return -EINVAL;
-	cap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	ret = pvr2_ctrl_set_value(
 			pvr2_hdw_get_ctrl_by_id(hdw, PVR2_CID_CROPL),
 			crop->c.left);
Signature · 1 line
1.7.10.2