diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/atmel-ssc.c | 2 | ||||
-rw-r--r-- | drivers/misc/sgi-gru/grukdump.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index b2a0340f277e..d8e3cc2dc747 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c | |||
@@ -132,7 +132,7 @@ static const struct of_device_id atmel_ssc_dt_ids[] = { | |||
132 | MODULE_DEVICE_TABLE(of, atmel_ssc_dt_ids); | 132 | MODULE_DEVICE_TABLE(of, atmel_ssc_dt_ids); |
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | static inline const struct atmel_ssc_platform_data * __init | 135 | static inline const struct atmel_ssc_platform_data * |
136 | atmel_ssc_get_driver_data(struct platform_device *pdev) | 136 | atmel_ssc_get_driver_data(struct platform_device *pdev) |
137 | { | 137 | { |
138 | if (pdev->dev.of_node) { | 138 | if (pdev->dev.of_node) { |
diff --git a/drivers/misc/sgi-gru/grukdump.c b/drivers/misc/sgi-gru/grukdump.c index 313da3150262..1540a7785e14 100644 --- a/drivers/misc/sgi-gru/grukdump.c +++ b/drivers/misc/sgi-gru/grukdump.c | |||
@@ -27,6 +27,9 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | #include <asm/uv/uv_hub.h> | 29 | #include <asm/uv/uv_hub.h> |
30 | |||
31 | #include <linux/nospec.h> | ||
32 | |||
30 | #include "gru.h" | 33 | #include "gru.h" |
31 | #include "grutables.h" | 34 | #include "grutables.h" |
32 | #include "gruhandles.h" | 35 | #include "gruhandles.h" |
@@ -196,6 +199,7 @@ int gru_dump_chiplet_request(unsigned long arg) | |||
196 | /* Currently, only dump by gid is implemented */ | 199 | /* Currently, only dump by gid is implemented */ |
197 | if (req.gid >= gru_max_gids) | 200 | if (req.gid >= gru_max_gids) |
198 | return -EINVAL; | 201 | return -EINVAL; |
202 | req.gid = array_index_nospec(req.gid, gru_max_gids); | ||
199 | 203 | ||
200 | gru = GID_TO_GRU(req.gid); | 204 | gru = GID_TO_GRU(req.gid); |
201 | ubuf = req.buf; | 205 | ubuf = req.buf; |