tpm: fix format string error in tpm-chip.c
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 20 Jan 2015 10:03:35 +0000 (12:03 +0200)
committerPeter Huewe <peterhuewe@gmx.de>
Tue, 20 Jan 2015 20:28:36 +0000 (21:28 +0100)
dev_set_name() takes three arguments where the second argument is
a format string. This patch fixes the call accordingly in tpm-chip.c

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 313d21eeab92 ("tpm: device class for tpm")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/tpm-chip.c

index 6459af7c164604156ab68f1df248b19d38aa794a..1d278ccd751f07002e6f6c2d43ad07e030a29bff 100644 (file)
@@ -125,7 +125,7 @@ struct tpm_chip *tpmm_chip_alloc(struct device *dev,
        else
                chip->dev.devt = MKDEV(MAJOR(tpm_devt), chip->dev_num);
 
-       dev_set_name(&chip->dev, chip->devname);
+       dev_set_name(&chip->dev, "%s", chip->devname);
 
        device_initialize(&chip->dev);