Re: [PATCH] PNX8550 NAND flash driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vladimir -- a couple comments.

+	PNX8550_XIO_FLASH_CTRL = reg_nand;
+	barrier();
+}

barrier() at the end of a function shouldn't be needed, function exit is an implicit optimizer flush?


+	pnx8550_nand_alloc_transfer_buffer();
+
+	memcpy(transferBuffer, buf, len);

Something should check for NULL return from kmalloc in both places this is called.

+	/* Scan to find existence of the device */
+	if (nand_scan(&pnx8550_mtd, 1)) {
+		printk(KERN_ERR "No NAND devices\n");
+		return -ENXIO;
+	}
+
+	if (!transferBuffer) {
+		printk(KERN_ERR
+		    "Unable to allocate NAND data buffer for PNX8550\n");
+		return -ENOMEM;
+	}

Not sure why transferBuffer was expected to be allocated at this point (only when first read/write_buf called, scan does read_byte)?


--
Todd


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux