aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/earlycon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/earlycon.c')
-rw-r--r--drivers/tty/serial/earlycon.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index a24278380fec..22683393a0f2 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -169,7 +169,7 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
169 */ 169 */
170int __init setup_earlycon(char *buf) 170int __init setup_earlycon(char *buf)
171{ 171{
172 const struct earlycon_id *match; 172 const struct earlycon_id **p_match;
173 173
174 if (!buf || !buf[0]) 174 if (!buf || !buf[0])
175 return -EINVAL; 175 return -EINVAL;
@@ -177,7 +177,9 @@ int __init setup_earlycon(char *buf)
177 if (early_con.flags & CON_ENABLED) 177 if (early_con.flags & CON_ENABLED)
178 return -EALREADY; 178 return -EALREADY;
179 179
180 for (match = __earlycon_table; match < __earlycon_table_end; match++) { 180 for (p_match = __earlycon_table; p_match < __earlycon_table_end;
181 p_match++) {
182 const struct earlycon_id *match = *p_match;
181 size_t len = strlen(match->name); 183 size_t len = strlen(match->name);
182 184
183 if (strncmp(buf, match->name, len)) 185 if (strncmp(buf, match->name, len))