From patchwork Wed Feb 10 10:47:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 61637 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2564512lbl; Wed, 10 Feb 2016 02:49:01 -0800 (PST) X-Received: by 10.66.161.66 with SMTP id xq2mr27127941pab.153.1455101340958; Wed, 10 Feb 2016 02:49:00 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fb6si4363529pab.87.2016.02.10.02.49.00; Wed, 10 Feb 2016 02:49:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754049AbcBJKs7 (ORCPT + 30 others); Wed, 10 Feb 2016 05:48:59 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:19724 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752992AbcBJKsB (ORCPT ); Wed, 10 Feb 2016 05:48:01 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O2B007WDVBVYH40@mailout1.w1.samsung.com>; Wed, 10 Feb 2016 10:47:56 +0000 (GMT) X-AuditID: cbfec7f4-f79026d00000418a-67-56bb155b5fa1 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id F0.28.16778.B551BB65; Wed, 10 Feb 2016 10:47:55 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O2B00JPPVBNIG20@eusync1.samsung.com>; Wed, 10 Feb 2016 10:47:55 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Marek Szyprowski , Russell King - ARM Linux , Ulf Hansson , Tomeu Vizoso , Greg Kroah-Hartman , Dan Williams , Kukjin Kim , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH v5 RESEND 2/5] ARM: sa1111: ensure no negative value gets returned on positive match Date: Wed, 10 Feb 2016 11:47:27 +0100 Message-id: <1455101250-11327-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1455101250-11327-1-git-send-email-m.szyprowski@samsung.com> References: <1455101250-11327-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNLMWRmVeSWpSXmKPExsVy+t/xy7rRorvDDH4eM7fYOGM9q8X0qRcY LZoXr2ezeP3C0KL/8Wtmi02Pr7FaXN41h81ixvl9TBa3L/NarD1yl92ib+0lNovja8MdeDxa mnvYPHbcXcLosXjPSyaPTas62TzuXNvD5rF/7hp2j81L6j36tqxi9Pi8SS6AM4rLJiU1J7Ms tUjfLoEr4/yf04wFF9gqurYtYm1gPM7axcjJISFgInHszEsoW0ziwr31bF2MXBxCAksZJQ6u bWSGcJqYJO68WcIMUsUmYCjR9baLDcQWEciWmL+3mx2kiFlgPrPEw1X9QKM4OIQF0iQebAoB qWERUJVoblnMAhLmFfCQOD+bD2KZnMT/lyuYQMKcAp4SV5bmgYSFgCoa1hxinsDIu4CRYRWj aGppckFxUnquoV5xYm5xaV66XnJ+7iZGSJB+2cG4+JjVIUYBDkYlHt4bJrvChFgTy4orcw8x SnAwK4nwTmLfHSbEm5JYWZValB9fVJqTWnyIUZqDRUmcd+6u9yFCAumJJanZqakFqUUwWSYO TqkGRuv4qEaB2tjOqXLldfL/9ALm+HyoOsH9bJl32Z8X8Qb6vzR/Xj/qt9bR74jp7jnTY8od shhc721fJxcUoxj3yyxscd+39PxlXyPN+kTEYv/2fNjAWbj1xWPLmM/5DrfsCz+91qln/uLn +Ng04/ntsPKzhoEi1yw+ffho2nB+dZQ8Q1bTV+avSizFGYmGWsxFxYkABIRkEU4CAAA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch ensures that existing bus match callbacks don't return negative values (which might be interpreted as potential errors in the future) in case of positive match. Signed-off-by: Marek Szyprowski --- arch/arm/common/sa1111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.2 diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 3d22494..fb0a0a4 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -1290,7 +1290,7 @@ static int sa1111_match(struct device *_dev, struct device_driver *_drv) struct sa1111_dev *dev = SA1111_DEV(_dev); struct sa1111_driver *drv = SA1111_DRV(_drv); - return dev->devid & drv->devid; + return !!(dev->devid & drv->devid); } static int sa1111_bus_suspend(struct device *dev, pm_message_t state)