lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 23 May 2014 00:00:09 +0200
From:	Rickard Strandqvist <>
To:	Mikael Starvik <>,
	Jesper Nilsson <>
Cc:	Rickard Strandqvist <>,
	Al Viro <>,,
Subject: [PATCH] arch: cris: arch-v32: drivers: axisflashmap.c:  Cleaning up inconsistent NULL checks

Cleaning up inconsistent NULL checks.
There is otherwise a risk of a possible null pointer dereference.

Was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <>
 arch/cris/arch-v32/drivers/axisflashmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c
index 28dd771..e359cd7 100644
--- a/arch/cris/arch-v32/drivers/axisflashmap.c
+++ b/arch/cris/arch-v32/drivers/axisflashmap.c
@@ -487,7 +487,7 @@ static int __init init_axis_flash(void)
 			axis_partitions[pidx].offset = offset + ptable->offset;
-			if (main_mtd->type == MTD_NANDFLASH) {
+			if (main_mtd && main_mtd->type == MTD_NANDFLASH) {
 				axis_partitions[pidx].size =
 					(((ptable+1)->offset ==

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists