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: 13764 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1B6DF23E03 for ; Wed, 2 Jan 2013 11:08:33 +0000 (UTC) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by fiordland.canonical.com (Postfix) with ESMTP id C006FA1939A for ; Wed, 2 Jan 2013 11:08:32 +0000 (UTC) Received: by mail-vb0-f47.google.com with SMTP id e21so13898821vbm.20 for ; Wed, 02 Jan 2013 03:08:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=DF1IxhDEorQlIIthF0Na5UuSQXX8nT5qlkbi8NWSEe0=; b=TFoYRV8GfFv+yNdiz/3AM6/BeieR7ELugDGgpgdhityi5ktfSSk4X2NwboYmKnTcTI 9kyzVSOhAbgj4+hOX0DAG7YtVkKpMfQFod6o0tLRUDFqtyikZWwI3ynMhqt2nzsvXZ3U d9/MXj7lWP8OebvRN0NN0N2wPnH4BwQSXv8gOWXJAfNqR8TqJS7ItYeyEnY5Nl8CnTvU AcEPdDA8fvhOq/riQEnsWEe6me4kvnPTb9BHTv8rXdBGn97emTH5MBxp+qGabcueG5jA u9rz4NpPJirx2yOg3r31pdZyJpiZAbRphKrQrtk2KopSZyMjVONtAoC2Rk2ER1ao1fgG ykYQ== X-Received: by 10.220.218.197 with SMTP id hr5mr68925199vcb.8.1357124912282; Wed, 02 Jan 2013 03:08:32 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp40700veb; Wed, 2 Jan 2013 03:08:31 -0800 (PST) X-Received: by 10.69.1.65 with SMTP id be1mr100720478pbd.66.1357124911230; Wed, 02 Jan 2013 03:08:31 -0800 (PST) Received: from mail-da0-f45.google.com (mail-da0-f45.google.com [209.85.210.45]) by mx.google.com with ESMTPS id uq10si44081943pbc.197.2013.01.02.03.08.30 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 03:08:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.45 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.45; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.45 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-da0-f45.google.com with SMTP id w4so6436926dam.32 for ; Wed, 02 Jan 2013 03:08:30 -0800 (PST) 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: ALoCoQmP1b3jXIERyhLWsEpIU5HJQniJvdKLN2T7xGzIBy1WboIApVa7c0bh4ujkxC4wiMY7ai6U 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;