From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7458DC28EBD for ; Sun, 9 Jun 2019 17:13:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4346E20652 for ; Sun, 9 Jun 2019 17:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560100382; bh=8a0EsAMS8bFTkPkp4ApwbHUXiaDh5qCTKRyWLlGhSpI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QQt7/WH8RNNTszeprjU/h0hoWBMls8xY0d4mmZHjeMhrsGZjSAXxUZaAd4fTTp55l 2QltavLy85m/MyaGJAUvQzBJJBmkQjPNHT4DTvcxr1HDkG9LBnkbJ0FKtcyJabB3fP cCqUoZhKAN9zWFRa0G87MmoJ8zenIZ5dwK0Ol9gY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387575AbfFIQ7A (ORCPT ); Sun, 9 Jun 2019 12:59:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:34488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732775AbfFIQ67 (ORCPT ); Sun, 9 Jun 2019 12:58:59 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B9B84207E0; Sun, 9 Jun 2019 16:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560099538; bh=8a0EsAMS8bFTkPkp4ApwbHUXiaDh5qCTKRyWLlGhSpI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BUzJifvGJPrfTkZVXysOCJLLOPf8HFve1U8UFlxuRjAljbvnr5lR6rrsT2vgY2Lnv ENZ21TKFlca8I5DljhaHGqN0Ta0XPU+ACf85YzVTwmP0UqJwmGzDpBY0YG19//UxtM gSCCtXXhIFzPM0v3n0NDMyRLOzU7M6iGBcI+eIvE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Rothwell , Yifeng Li , Sudip Mukherjee , "Gustavo A. R. Silva" , Kees Cook , Bartlomiej Zolnierkiewicz Subject: [PATCH 4.4 075/241] fbdev: sm712fb: fix memory frequency by avoiding a switch/case fallthrough Date: Sun, 9 Jun 2019 18:40:17 +0200 Message-Id: <20190609164149.936716585@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190609164147.729157653@linuxfoundation.org> References: <20190609164147.729157653@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yifeng Li commit 9dc20113988b9a75ea6b3abd68dc45e2d73ccdab upstream. A fallthrough in switch/case was introduced in f627caf55b8e ("fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting"), due to my copy-paste error, which would cause the memory clock frequency for SM720 to be programmed to SM712. Since it only reprograms the clock to a different frequency, it's only a benign issue without visible side-effect, so it also evaded Sudip Mukherjee's code review and regression tests. scripts/checkpatch.pl also failed to discover the issue, possibly due to nested switch statements. This issue was found by Stephen Rothwell by building linux-next with -Wimplicit-fallthrough. Reported-by: Stephen Rothwell Fixes: f627caf55b8e ("fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting") Signed-off-by: Yifeng Li Cc: Sudip Mukherjee Cc: "Gustavo A. R. Silva" Cc: Kees Cook Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/sm712fb.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -898,6 +898,7 @@ static int smtc_blank(int blank_mode, st case 0x712: smtc_seqw(0x6a, 0x16); smtc_seqw(0x6b, 0x02); + break; case 0x720: smtc_seqw(0x6a, 0x0d); smtc_seqw(0x6b, 0x02);