summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-11-20 11:30:17 +0100
committerMatt Fleming <matt@codeblueprint.co.uk>2015-12-14 15:24:03 +0000
commit7f83773ced2f9f41dec5e6eb3eb4a7ef23ca1d75 (patch)
tree04f7e7871c6d20bf2ef8679e8e67d715cad08349 /drivers
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
downloadop-kernel-dev-7f83773ced2f9f41dec5e6eb3eb4a7ef23ca1d75.zip
op-kernel-dev-7f83773ced2f9f41dec5e6eb3eb4a7ef23ca1d75.tar.gz
efi/esrt: Don't preformat name
kobject_init_and_add takes a format string+args, so there's no reason to do this formatting in advance. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Peter Jones <pjones@redhat.com> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firmware/efi/esrt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c
index 22c5285..75feb3f 100644
--- a/drivers/firmware/efi/esrt.c
+++ b/drivers/firmware/efi/esrt.c
@@ -167,14 +167,11 @@ static struct kset *esrt_kset;
static int esre_create_sysfs_entry(void *esre, int entry_num)
{
struct esre_entry *entry;
- char name[20];
entry = kzalloc(sizeof(*entry), GFP_KERNEL);
if (!entry)
return -ENOMEM;
- sprintf(name, "entry%d", entry_num);
-
entry->kobj.kset = esrt_kset;
if (esrt->fw_resource_version == 1) {
@@ -182,7 +179,7 @@ static int esre_create_sysfs_entry(void *esre, int entry_num)
entry->esre.esre1 = esre;
rc = kobject_init_and_add(&entry->kobj, &esre1_ktype, NULL,
- "%s", name);
+ "entry%d", entry_num);
if (rc) {
kfree(entry);
return rc;
OpenPOWER on IntegriCloud