From patchwork Wed Jan 2 11:00:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1923041 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0B30FDF25A for ; Wed, 2 Jan 2013 11:08:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752682Ab3ABLIb (ORCPT ); Wed, 2 Jan 2013 06:08:31 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:54929 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752383Ab3ABLIb (ORCPT ); Wed, 2 Jan 2013 06:08:31 -0500 Received: by mail-pa0-f43.google.com with SMTP id fb10so7956354pad.16 for ; Wed, 02 Jan 2013 03:08:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=DF1IxhDEorQlIIthF0Na5UuSQXX8nT5qlkbi8NWSEe0=; b=N5wu2z39Kk/e6q3QwgvcZ0bQ/JSkZfPJgRvGXY6susQFRE+BwWFw9Hr6X5hFCFX+83 h+XBectNOtUiYWMTBr3wZKslX4WhCpHmWLfsqubbomFK+XmSWViZNOFqo2svyU/Zy4Z8 y5W4kYZh3ImHuD12oVJ9hZaTKxNUkXM0lgCpXBWIWnfMAK+hOndfMkWdjB8Pdlw5Brn8 LCc0QRpRbAR5TEL5VvoMoPpv9yV4EZN/+U0lVHm0Dze/8AZB06cfEIvaUi5HJa8TtPGF 0HBZm//mGo6gRn5qsxthyJgHELqHG9BKtnBZB/Pu/yocivxzgY0Ne09rrAu0oc7ZHRcm 17kA== X-Received: by 10.68.241.133 with SMTP id wi5mr142471242pbc.48.1357124910707; Wed, 02 Jan 2013 03:08:30 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ty4sm28269412pbc.57.2013.01.02.03.08.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 03:08:30 -0800 (PST) From: Sachin Kamat To: linux-fbdev@vger.kernel.org Cc: FlorianSchandinat@gmx.de, dh09.lee@samsung.com, inki.dae@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] video: exynos_mipi_dsi: Fix an error check condition Date: Wed, 2 Jan 2013 16:30:33 +0530 Message-Id: <1357124433-24455-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQn4HINiRc7bkJ6hQ3CWRRXNZnZXkriR51OIm6E+PByx7uwYlTp9ticgZTAl0LVh3zXjvPS2 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Checking an unsigned variable for negative value returns false. Hence use the macro to fix it. Fixes the following smatch warning: drivers/video/exynos/exynos_mipi_dsi.c:417 exynos_mipi_dsi_probe() warn: unsigned 'dsim->irq' is never less than zero. Signed-off-by: Sachin Kamat Acked-by: Donghwa Lee --- drivers/video/exynos/exynos_mipi_dsi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c index 4a17cdc..f623dfc 100644 --- a/drivers/video/exynos/exynos_mipi_dsi.c +++ b/drivers/video/exynos/exynos_mipi_dsi.c @@ -414,7 +414,7 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev) } dsim->irq = platform_get_irq(pdev, 0); - if (dsim->irq < 0) { + if (IS_ERR_VALUE(dsim->irq)) { dev_err(&pdev->dev, "failed to request dsim irq resource\n"); ret = -EINVAL; goto err_platform_get_irq;