diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-29 11:21:17 +0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-11-30 07:32:08 +0300 |
| commit | 578914cffc283b907777796420148d582072cbae (patch) | |
| tree | 60d2d204b217524db1c3589d97306ce9323407a1 | |
| parent | 36673307aee535f951f4eede81049c6962bc4ba9 (diff) | |
| download | linux-578914cffc283b907777796420148d582072cbae.tar.xz | |
powerpc/nvram: Ensure that the partition header/block size is right
Use BUILD_BUG_ON to ensure the structure representing a partition
header have the right size.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| -rw-r--r-- | arch/powerpc/kernel/nvram_64.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index a5a5587121a7..f7538820c03d 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c @@ -565,6 +565,8 @@ static int __init nvram_init(void) int error; int rc; + BUILD_BUG_ON(NVRAM_BLOCK_LEN != 16); + if (ppc_md.nvram_size == NULL || ppc_md.nvram_size() <= 0) return -ENODEV; |
