aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/video1394.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-09-11 13:22:53 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-10-15 16:21:09 -0400
commitd98562d12f71284593b3a5db020d6f2655061efe (patch)
treeb6ebacb0acfbc6805ce7cd2cb17d061c2d0c8e23 /drivers/ieee1394/video1394.c
parentf22e52b89e036fd12b9374212da8b5d4a447bd1e (diff)
ieee1394: dv1394, video1394: remove unnecessary expressions
init->channel and v.buffer are unsigned and tests for < 0 therefore always false. gcc knows this and eliminates the code, but anyway... Reported by Roel Kluin. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/video1394.c')
-rw-r--r--drivers/ieee1394/video1394.c8
1 files changed, 4 insertions, 4 deletions
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;