Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 578914cf authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt
Browse files

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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 36673307
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;