aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ieee1394/dv1394.c2
-rw-r--r--drivers/ieee1394/video1394.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
index b6eb2cf25914..df70f51279d8 100644
--- a/drivers/ieee1394/dv1394.c
+++ b/drivers/ieee1394/dv1394.c
@@ -918,7 +918,7 @@ static int do_dv1394_init(struct video_card *video, struct dv1394_init *init)
918 /* default SYT offset is 3 cycles */ 918 /* default SYT offset is 3 cycles */
919 init->syt_offset = 3; 919 init->syt_offset = 3;
920 920
921 if ( (init->channel > 63) || (init->channel < 0) ) 921 if (init->channel > 63)
922 init->channel = 63; 922 init->channel = 63;
923 923
924 chan_mask = (u64)1 << init->channel; 924 chan_mask = (u64)1 << init->channel;
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
index 25db6e67fa4e..fa9e7d8b51fe 100644
--- a/drivers/ieee1394/video1394.c
+++ b/drivers/ieee1394/video1394.c
@@ -893,7 +893,7 @@ static long video1394_ioctl(struct file *file,
893 if (unlikely(d == NULL)) 893 if (unlikely(d == NULL))
894 return -EFAULT; 894 return -EFAULT;
895 895
896 if (unlikely((v.buffer<0) || (v.buffer>=d->num_desc - 1))) { 896 if (unlikely(v.buffer >= d->num_desc - 1)) {
897 PRINT(KERN_ERR, ohci->host->id, 897 PRINT(KERN_ERR, ohci->host->id,
898 "Buffer %d out of range",v.buffer); 898 "Buffer %d out of range",v.buffer);
899 return -EINVAL; 899 return -EINVAL;
@@ -959,7 +959,7 @@ static long video1394_ioctl(struct file *file,
959 if (unlikely(d == NULL)) 959 if (unlikely(d == NULL))
960 return -EFAULT; 960 return -EFAULT;
961 961
962 if (unlikely((v.buffer<0) || (v.buffer>d->num_desc - 1))) { 962 if (unlikely(v.buffer > d->num_desc - 1)) {
963 PRINT(KERN_ERR, ohci->host->id, 963 PRINT(KERN_ERR, ohci->host->id,
964 "Buffer %d out of range",v.buffer); 964 "Buffer %d out of range",v.buffer);
965 return -EINVAL; 965 return -EINVAL;
@@ -1030,7 +1030,7 @@ static long video1394_ioctl(struct file *file,
1030 d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel); 1030 d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel);
1031 if (d == NULL) return -EFAULT; 1031 if (d == NULL) return -EFAULT;
1032 1032
1033 if ((v.buffer<0) || (v.buffer>=d->num_desc - 1)) { 1033 if (v.buffer >= d->num_desc - 1) {
1034 PRINT(KERN_ERR, ohci->host->id, 1034 PRINT(KERN_ERR, ohci->host->id,
1035 "Buffer %d out of range",v.buffer); 1035 "Buffer %d out of range",v.buffer);
1036 return -EINVAL; 1036 return -EINVAL;
@@ -1137,7 +1137,7 @@ static long video1394_ioctl(struct file *file,
1137 d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel); 1137 d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel);
1138 if (d == NULL) return -EFAULT; 1138 if (d == NULL) return -EFAULT;
1139 1139
1140 if ((v.buffer<0) || (v.buffer>=d->num_desc-1)) { 1140 if (v.buffer >= d->num_desc - 1) {
1141 PRINT(KERN_ERR, ohci->host->id, 1141 PRINT(KERN_ERR, ohci->host->id,
1142 "Buffer %d out of range",v.buffer); 1142 "Buffer %d out of range",v.buffer);
1143 return -EINVAL; 1143 return -EINVAL;