diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index a37eda9f11f5eb0fc365a62948c6f72a2976c71c..91e8a953d1de7fddf2c3cb967f8bcdcd4350d603 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -142,7 +142,7 @@ sd_store_cache_type(struct device *dev, struct device_attribute *attr,
 	char *buffer_data;
 	struct scsi_mode_data data;
 	struct scsi_sense_hdr sshdr;
-	const char *temp = "temporary ";
+	static const char temp[] = "temporary ";
 	int len;
 
 	if (sdp->type != TYPE_DISK)