Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-20160415' of git://git.infradead.org/linux-mtd

Pull MTD fix from Brian Norris:
"One MTD fix for v4.6-rc4:

In the v4.4 cycle, we relaxed the requirement for assigning
mtd->owner, but we didn't remove this error case. It's hit only
by drivers that are both:

(a) using nand_scan() directly
and
(b) built as modules

We haven't seen explicit complaints about this (most use cases don't
fit one or both of the above), but we should definitely not be
BUG()'ing here"

* tag 'for-linus-20160415' of git://git.infradead.org/linux-mtd:
mtd: nand: Drop mtd.owner requirement in nand_scan

+1 -9
+1 -9
drivers/mtd/nand/nand_base.c
··· 4009 4009 * This is the first phase of the normal nand_scan() function. It reads the 4010 4010 * flash ID and sets up MTD fields accordingly. 4011 4011 * 4012 - * The mtd->owner field must be set to the module of the caller. 4013 4012 */ 4014 4013 int nand_scan_ident(struct mtd_info *mtd, int maxchips, 4015 4014 struct nand_flash_dev *table) ··· 4428 4429 * 4429 4430 * This fills out all the uninitialized function pointers with the defaults. 4430 4431 * The flash ID is read and the mtd/chip structures are filled with the 4431 - * appropriate values. The mtd->owner field must be set to the module of the 4432 - * caller. 4432 + * appropriate values. 4433 4433 */ 4434 4434 int nand_scan(struct mtd_info *mtd, int maxchips) 4435 4435 { 4436 4436 int ret; 4437 - 4438 - /* Many callers got this wrong, so check for it for a while... */ 4439 - if (!mtd->owner && caller_is_module()) { 4440 - pr_crit("%s called with NULL mtd->owner!\n", __func__); 4441 - BUG(); 4442 - } 4443 4437 4444 4438 ret = nand_scan_ident(mtd, maxchips, NULL); 4445 4439 if (!ret)