powerpc: mpc5200: Correct return value of memcpy function
authorMark Marshall <[email protected]>
Tue, 24 Jan 2017 12:47:31 +0000 (13:47 +0100)
committerYork Sun <[email protected]>
Wed, 1 Feb 2017 16:14:39 +0000 (08:14 -0800)
The memcpy() function returns a pointer to trg.

Signed-off-by: Mark Marshall <[email protected]>
Reviewed-by: Thomas Graziadei <[email protected]>
Reviewed-by: Anatolij Gustschin <[email protected]>
Reviewed-by: York Sun <[email protected]>
arch/powerpc/lib/memcpy_mpc5200.c

index 75a3ef95280adbd10ead7c9f3abbf0d544dbd80b..7e5a0057894c534b382c9b8a6b60fd64abf8a66c 100644 (file)
@@ -31,7 +31,7 @@ void *memcpy(void *trg, const void *src, size_t len)
        extern void* __memcpy(void *, const void *, size_t);
        char *s = (char *)src;
        char *t = (char *)trg;
-       void *dest = (void *)src;
+       void *dest = (void *)trg;
 
        /*
         * Check is source address is in flash: