summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi-nor/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/spi-nor/sysfs.c')
-rw-r--r--drivers/mtd/spi-nor/sysfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/sysfs.c b/drivers/mtd/spi-nor/sysfs.c
index 2dfdc555a6..96064e4bab 100644
--- a/drivers/mtd/spi-nor/sysfs.c
+++ b/drivers/mtd/spi-nor/sysfs.c
@@ -78,6 +78,8 @@ static umode_t spi_nor_sysfs_is_visible(struct kobject *kobj,
if (attr == &dev_attr_manufacturer.attr && !nor->manufacturer)
return 0;
+ if (attr == &dev_attr_partname.attr && !nor->info->name)
+ return 0;
if (attr == &dev_attr_jedec_id.attr && !nor->info->id && !nor->id)
return 0;