ipmi: Initialize BMC device attributes
authorCorey Minyard <cminyard@mvista.com>
Fri, 7 Nov 2014 02:11:40 +0000 (20:11 -0600)
committerCorey Minyard <cminyard@mvista.com>
Thu, 11 Dec 2014 21:04:07 +0000 (15:04 -0600)
This avoids an oops at initialization time.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Sanjeev <singhsan@codeaurora.org>
drivers/char/ipmi/ipmi_msghandler.c

index 3e8663b1a62b7a36b138baf631febccc47621b5b..dac563709cd54fcb842f4deb37f4eca7ec1d4b88 100644 (file)
@@ -2390,12 +2390,14 @@ static int create_bmc_files(struct bmc_device *bmc)
        int err;
 
        if (bmc->id.aux_firmware_revision_set) {
+               bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision";
                err = device_create_file(&bmc->pdev.dev,
                                   &bmc->aux_firmware_rev_attr);
                if (err)
                        goto out;
        }
        if (bmc->guid_set) {
+               bmc->guid_attr.attr.name = "guid";
                err = device_create_file(&bmc->pdev.dev,
                                   &bmc->guid_attr);
                if (err)