V4L/DVB (12426): pvrusb2: fix compile warning
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 7 Aug 2009 08:32:20 +0000 (05:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 12 Sep 2009 15:18:49 +0000 (12:18 -0300)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/pvrusb2/pvrusb2-audio.c

index 416933c..cc06d5e 100644 (file)
@@ -65,9 +65,10 @@ void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
                u32 input;
 
                pvr2_trace(PVR2_TRACE_CHIPS, "subdev msp3400 v4l2 set_stereo");
+               sp = (sid < ARRAY_SIZE(routing_schemes)) ?
+                       routing_schemes[sid] : NULL;
 
-               if ((sid < ARRAY_SIZE(routing_schemes)) &&
-                   ((sp = routing_schemes[sid]) != NULL) &&
+               if ((sp != NULL) &&
                    (hdw->input_val >= 0) &&
                    (hdw->input_val < sp->cnt)) {
                        input = sp->def[hdw->input_val];