diff options
Diffstat (limited to 'arch/alpha/lib/csum_partial_copy.c')
-rw-r--r-- | arch/alpha/lib/csum_partial_copy.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/alpha/lib/csum_partial_copy.c b/arch/alpha/lib/csum_partial_copy.c index ffb19b7da999..ff3c10721caf 100644 --- a/arch/alpha/lib/csum_partial_copy.c +++ b/arch/alpha/lib/csum_partial_copy.c | |||
@@ -130,7 +130,7 @@ csum_partial_cfu_aligned(const unsigned long __user *src, unsigned long *dst, | |||
130 | *dst = word | tmp; | 130 | *dst = word | tmp; |
131 | checksum += carry; | 131 | checksum += carry; |
132 | } | 132 | } |
133 | if (err) *errp = err; | 133 | if (err && errp) *errp = err; |
134 | return checksum; | 134 | return checksum; |
135 | } | 135 | } |
136 | 136 | ||
@@ -185,7 +185,7 @@ csum_partial_cfu_dest_aligned(const unsigned long __user *src, | |||
185 | *dst = word | tmp; | 185 | *dst = word | tmp; |
186 | checksum += carry; | 186 | checksum += carry; |
187 | } | 187 | } |
188 | if (err) *errp = err; | 188 | if (err && errp) *errp = err; |
189 | return checksum; | 189 | return checksum; |
190 | } | 190 | } |
191 | 191 | ||
@@ -242,7 +242,7 @@ csum_partial_cfu_src_aligned(const unsigned long __user *src, | |||
242 | stq_u(partial_dest | second_dest, dst); | 242 | stq_u(partial_dest | second_dest, dst); |
243 | out: | 243 | out: |
244 | checksum += carry; | 244 | checksum += carry; |
245 | if (err) *errp = err; | 245 | if (err && errp) *errp = err; |
246 | return checksum; | 246 | return checksum; |
247 | } | 247 | } |
248 | 248 | ||
@@ -325,7 +325,7 @@ csum_partial_cfu_unaligned(const unsigned long __user * src, | |||
325 | stq_u(partial_dest | word | second_dest, dst); | 325 | stq_u(partial_dest | word | second_dest, dst); |
326 | checksum += carry; | 326 | checksum += carry; |
327 | } | 327 | } |
328 | if (err) *errp = err; | 328 | if (err && errp) *errp = err; |
329 | return checksum; | 329 | return checksum; |
330 | } | 330 | } |
331 | 331 | ||
@@ -339,7 +339,7 @@ csum_partial_copy_from_user(const void __user *src, void *dst, int len, | |||
339 | 339 | ||
340 | if (len) { | 340 | if (len) { |
341 | if (!access_ok(VERIFY_READ, src, len)) { | 341 | if (!access_ok(VERIFY_READ, src, len)) { |
342 | *errp = -EFAULT; | 342 | if (errp) *errp = -EFAULT; |
343 | memset(dst, 0, len); | 343 | memset(dst, 0, len); |
344 | return sum; | 344 | return sum; |
345 | } | 345 | } |