diff options
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index f6e5771f4..065ccb0bb 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -3245,7 +3245,8 @@ int pvr2_hdw_register_access(struct pvr2_hdw *hdw, struct list_head *item; struct pvr2_i2c_client *cp; struct v4l2_register req; - int stat; + int stat = 0; + int okFl = 0; req.i2c_id = chip_id; req.reg = reg_id; @@ -3258,9 +3259,13 @@ int pvr2_hdw_register_access(struct pvr2_hdw *hdw, cp,(setFl ? VIDIOC_INT_S_REGISTER : VIDIOC_INT_G_REGISTER),&req); if (!setFl) *val_ptr = req.val; - return stat; + okFl = !0; + break; } } while (0); mutex_unlock(&hdw->i2c_list_lock); + if (okFl) { + return stat; + } return -EINVAL; #else return -ENOSYS; |