From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753268AbcHWPwj (ORCPT ); Tue, 23 Aug 2016 11:52:39 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:41380 "EHLO mx1.polytechnique.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbcHWPwh (ORCPT ); Tue, 23 Aug 2016 11:52:37 -0400 From: Nicolas Iooss To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Nicolas Iooss Subject: [PATCH 1/1] printk: fix parsing of "brl=" option Date: Tue, 23 Aug 2016 17:47:35 +0200 Message-Id: <20160823154735.26294-1-nicolas.iooss_linux@m4x.org> X-Mailer: git-send-email 2.9.3 X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Tue Aug 23 17:51:46 2016 +0200 (CEST)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.000330, queueID=B40485646F3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit bbeddf52adc1 ("printk: move braille console support into separate braille.[ch] files") moved the parsing of braille-related options into _braille_console_setup(), changing the type of variable str from char* to char**. In this commit, memcmp(str, "brl,", 4) was correctly updated to memcmp(*str, "brl,", 4) but not memcmp(str, "brl=", 4). Update the code to make "brl=" option work again. Fixes: bbeddf52adc1 ("printk: move braille console support into separate braille.[ch] files") Signed-off-by: Nicolas Iooss --- kernel/printk/braille.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/printk/braille.c b/kernel/printk/braille.c index 276762f3a460..f735ade8494c 100644 --- a/kernel/printk/braille.c +++ b/kernel/printk/braille.c @@ -12,7 +12,7 @@ char *_braille_console_setup(char **str, char **brl_options) if (!memcmp(*str, "brl,", 4)) { *brl_options = ""; *str += 4; - } else if (!memcmp(str, "brl=", 4)) { + } else if (!memcmp(*str, "brl=", 4)) { *brl_options = *str + 4; *str = strchr(*brl_options, ','); if (!*str) -- 2.9.3