X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=fs%2Fbtrfs%2Fcompression.c;fp=fs%2Fbtrfs%2Fcompression.c;h=b1b4498fba51d87566061fb04e47b9f720bdd174;hb=2021f083ed634f8233054a6299d95666a933434e;hp=a59ff5a8bbf4e845cdaea8d3ed498a6159d5c5ad;hpb=990dba649852d79a3ac5f9540a713f6207cf7ea8;p=u-boot diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index a59ff5a8bb..b1b4498fba 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -9,6 +9,7 @@ #include "btrfs.h" #include #include +#include static u32 decompress_lzo(const u8 *cbuf, u32 clen, u8 *dbuf, u32 dlen) { @@ -19,7 +20,7 @@ static u32 decompress_lzo(const u8 *cbuf, u32 clen, u8 *dbuf, u32 dlen) if (clen < 4) return -1; - tot_len = le32_to_cpu(*(u32 *) cbuf); + tot_len = le32_to_cpu(get_unaligned((u32 *)cbuf)); cbuf += 4; clen -= 4; tot_len -= 4; @@ -32,7 +33,7 @@ static u32 decompress_lzo(const u8 *cbuf, u32 clen, u8 *dbuf, u32 dlen) res = 0; while (tot_len > 4) { - in_len = le32_to_cpu(*(u32 *) cbuf); + in_len = le32_to_cpu(get_unaligned((u32 *)cbuf)); cbuf += 4; clen -= 4;