Signed-off-by: Michal Suchanek <msucha...@suse.de>
---
 arch/powerpc/kernel/fadump.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 0e08f1a80af2..b214c1e333dd 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -501,10 +501,12 @@ static void __init fadump_update_params(struct param_info 
*param_info,
        }
 
        /* next_arg removes one leading and one trailing '"' */
-       if (*(tgt + FADUMP_EXTRA_ARGS_LEN + 1) == '"')
-               shortening += 1;
-       if (*(tgt + FADUMP_EXTRA_ARGS_LEN + 1 + vallen + shortening) == '"')
+       if ((*(tgt + FADUMP_EXTRA_ARGS_LEN + 1 + vallen + shortening) == '"') &&
+           (quoted || (*(tgt + FADUMP_EXTRA_ARGS_LEN + 1) == '"'))) {
                shortening += 1;
+               if (!quoted)
+                       shortening += 1;
+       }
 
        /* remove one leading and one trailing quote if both are present */
        if ((val[0] == '"') && (val[vallen - 1] == '"')) {
-- 
2.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to