From patchwork Wed Aug 2 09:55:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 9876497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B0D26041F for ; Wed, 2 Aug 2017 09:55:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76F442879F for ; Wed, 2 Aug 2017 09:55:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A528287A6; Wed, 2 Aug 2017 09:55:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 961D6287A3 for ; Wed, 2 Aug 2017 09:55:55 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 62EF3267277; Wed, 2 Aug 2017 11:55:35 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 281ED26727B; Wed, 2 Aug 2017 11:55:34 +0200 (CEST) Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by alsa0.perex.cz (Postfix) with ESMTP id D797B26720B for ; Wed, 2 Aug 2017 11:55:31 +0200 (CEST) Received: by mail-pf0-f196.google.com with SMTP id p13so2034999pfd.4 for ; Wed, 02 Aug 2017 02:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ingics-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=SneqF8gugRjYjEZ/YfIVO3oL7AUqPwZktV1tIUhS6TY=; b=Nrp4IWR34V6EGRkLbOXN86dKNxqAngRihYUsFyODMm5s4jqK8c5/mHTRawzQRyul9W eW4oPHjWu7L3tl47MPDNBN6kLusM46bfbc+EybmtIXADVOyLm5zkiPz2JpC2qIhz6WsU AqCHZ10KdUGH90GqkGNfevCzzQYLSjg+wTZYn33+LHXf5lS0UiGSOlAyGGMG4t3bT6y6 6/eqVKFqlJsq3bH2ek7Td/CnnVwTy1EZURmFxu4JSmLz8jmdXMaVH9zoDlLvEH4QgUmL likbQ/ZZDXjYE+S+j/F182JHehfjEVPLIYGPXUnCWGLISXrPu4OiYI5xunznt9FRrm3M wyQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SneqF8gugRjYjEZ/YfIVO3oL7AUqPwZktV1tIUhS6TY=; b=BPzx84as5mSizvQkBYe9PXWUcUTowT1Xt+qiul7XGqrjdk7TWRA4yl+vDiphI7MNTL CQj+ABJFWS/FENGyk8gVsOFhWzM+iCpeg5HRgKikpXML7bRllCNg50upah88k7woInDG q6LLqwg52iLPDUDxR7QZIiZm4jLekp/WbsYk051Dg3z6n1Lst0kAuNqZz1Dp6BEc6YRw 0dkUhHAL3Miugdi1khsK8UKAbW8rT7EfT3fddhMY2j/W5LUQEFVRoJtScDPbnoxObMZd /fo9/WtibzsAmuZyCEkwIkmmcMKlLTa3xt8xMVkxyYUTMppmtZG5FHwi3q20V1wbG+k5 HyqA== X-Gm-Message-State: AIVw110HTuebuQ5JvvWuuEgWCPu7/zCuNLZTmB5r9X9Ux+IR8RlfgA6R ZNfTjonNkIuzCsOL X-Received: by 10.98.158.66 with SMTP id s63mr18841043pfd.126.1501667730160; Wed, 02 Aug 2017 02:55:30 -0700 (PDT) Received: from localhost.localdomain (118-171-142-123.dynamic-ip.hinet.net. [118.171.142.123]) by smtp.gmail.com with ESMTPSA id s18sm45588356pfg.166.2017.08.02.02.55.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2017 02:55:29 -0700 (PDT) From: Axel Lin To: Mark Brown Date: Wed, 2 Aug 2017 17:55:13 +0800 Message-Id: <20170802095514.29138-1-axel.lin@ingics.com> X-Mailer: git-send-email 2.9.3 Cc: patches@opensource.cirrus.com, Charles Keepax , Axel Lin , Liam Girdwood , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 1/2] ASoC: wm8523: Fix array size for bclk_ratios X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP ARRAY_SIZE(bclk_ratios) returns 7 for current code, then it cannot catch the error if "no matching BCLK/fs ratio". Fix it. Signed-off-by: Axel Lin --- sound/soc/codecs/wm8523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index 6d0a272..b1e4ce7 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c @@ -116,7 +116,7 @@ static struct { static struct { int value; int ratio; -} bclk_ratios[WM8523_NUM_RATES] = { +} bclk_ratios[] = { { 2, 32 }, { 3, 64 }, { 4, 128 },