mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 20:34:23 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user