From patchwork Thu Aug 23 13:59:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10574057 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B25B5A4 for ; Thu, 23 Aug 2018 14:00:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 090CA2C17D for ; Thu, 23 Aug 2018 14:00:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE70E2C181; Thu, 23 Aug 2018 14:00:44 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17D752C17D for ; Thu, 23 Aug 2018 14:00:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728912AbeHWRab (ORCPT ); Thu, 23 Aug 2018 13:30:31 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:45614 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728707AbeHWRab (ORCPT ); Thu, 23 Aug 2018 13:30:31 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w7NDwemc003824; Thu, 23 Aug 2018 14:00:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=Wg6A36ZrnQt/4FVRHIp8X5yxXxWNPNurTW37i5TYeO8=; b=TyhslohfNpeqWVA34/J03RvgDPbt8+3xjtpeQff1zd729s1ZfSCIX/ZMyTRFEz3h3DYM cve9gkB2CzGe31ehY3bbwhnvm3hVYc+14E3RKMUt2zx1xn5djfa8Ub+ViFM9bBaJS0fk I/nSpI+QllPOhGP/Xt4jJpne8X92XekxiHezbcTS/+HW50QBspQFxp7Pnm1VRdnB9rHr zF7vxMMd7mBseXRjrr0LvMWSVq2qLA1kSNvnKbsYeeYQQSFt77pQj0I+/PU4PDYb0JM2 OF3n4LwbOA+8lgxNNcYJDTAM1Lo7iOl26AFtbmAYw18L8gM5K2ka2UjLeJx2wvWIVJQe 9w== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2kxbdq9m0g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Aug 2018 14:00:29 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w7NE0QY0000922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Aug 2018 14:00:26 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w7NE0P0o009103; Thu, 23 Aug 2018 14:00:25 GMT Received: from kili.mountain (/197.232.248.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 23 Aug 2018 14:00:17 +0000 Date: Thu, 23 Aug 2018 16:59:25 +0300 From: Dan Carpenter To: "Rafael J. Wysocki" , Jon Hunter Cc: Pavel Machek , Len Brown , Greg Kroah-Hartman , linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] PM / clk: signedness bug in of_pm_clk_add_clks() Message-ID: <20180823135925.6tt64b7tvbmeidiv@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8993 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=864 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808230149 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP "count" needs to be signed for the error handling to work. I made "i" signed as well so they match. Fixes: 02113ba93ea4 ("PM / clk: Add support for obtaining clocks from device-tree") Signed-off-by: Dan Carpenter diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index 8e2e4757adcb..5a42ae4078c2 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c @@ -185,7 +185,7 @@ EXPORT_SYMBOL_GPL(of_pm_clk_add_clk); int of_pm_clk_add_clks(struct device *dev) { struct clk **clks; - unsigned int i, count; + int i, count; int ret; if (!dev || !dev->of_node)