From patchwork Thu May 21 18:25:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 25279 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4LIPR67031157 for ; Thu, 21 May 2009 18:25:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753352AbZEUSZY (ORCPT ); Thu, 21 May 2009 14:25:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753163AbZEUSZY (ORCPT ); Thu, 21 May 2009 14:25:24 -0400 Received: from mail-ew0-f176.google.com ([209.85.219.176]:59430 "EHLO mail-ew0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753352AbZEUSZX (ORCPT ); Thu, 21 May 2009 14:25:23 -0400 Received: by ewy24 with SMTP id 24so1393684ewy.37 for ; Thu, 21 May 2009 11:25:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=MQNC+jBt0up5JZ8uQXnyXC/XLcapArQFkRC1UuD1NY0=; b=Oc94IVMI4hP/BUISpSAm57YFyA1QKyHIo/IVTJl6fIznN2pBS8PvUTE5OC5NcU7ABe 179MSQ8nL3n9FAHE3w5D4+fPVbpm+RpdjrMqqmxOp826qN/oLdE+/COOX8qobdCI5ZUD TmzO++Treoe+ilt4foXqZ8I65bFfEW+NLIoOY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=i+yPRIX3UJEvys6TTANBWixiBavym8oN+FOOj2rvYYf0OjLbf4rkEWUnSJ/viOJ8Yo rRNlWGXhhIs5EDNrVLSIGv8ldjT3JVCA/H5DlbZSDKzfje6IDdr+XBi/G0bfhQg2zYLs AsI/Ba6kMFb6EJcKgHAn1+73OqvedjBfxaF88= Received: by 10.210.17.2 with SMTP id 2mr9361083ebq.73.1242930323957; Thu, 21 May 2009 11:25:23 -0700 (PDT) Received: from ?192.168.1.2? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 24sm5208839eyx.53.2009.05.21.11.25.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 21 May 2009 11:25:23 -0700 (PDT) Message-ID: <4A159C93.2030000@gmail.com> Date: Thu, 21 May 2009 20:25:23 +0200 From: Roel Kluin User-Agent: Thunderbird 2.0.0.21 (X11/20090302) MIME-Version: 1.0 To: Paul Mundt CC: linux-sh@vger.kernel.org, Andrew Morton Subject: [PATCH] SUPERH:beyond ARRAY_SIZE of onchip_ops Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Do not go beyond ARRAY_SIZE of onchip_ops Signed-off-by: Roel Kluin --- -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c index 0e174af..d4757ad 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c @@ -809,7 +809,7 @@ struct clk_ops *onchip_ops[] = { void __init arch_init_clk_ops(struct clk_ops **ops, int type) { - BUG_ON(type < 0 || type > ARRAY_SIZE(onchip_ops)); + BUG_ON(type < 0 || type >= ARRAY_SIZE(onchip_ops)); *ops = onchip_ops[type]; }