From patchwork Tue Sep 18 12:08:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Senna Tschudin X-Patchwork-Id: 1472331 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2D30540113 for ; Tue, 18 Sep 2012 12:08:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932879Ab2IRMIb (ORCPT ); Tue, 18 Sep 2012 08:08:31 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:59700 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932843Ab2IRMIS (ORCPT ); Tue, 18 Sep 2012 08:08:18 -0400 Received: by wibhr14 with SMTP id hr14so3877497wib.1 for ; Tue, 18 Sep 2012 05:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=LmgP+hCjvF5cXM1t8Cg8asLPup+ED9U/IGLjeQF9INE=; b=iceoTn/PU63cW6OeGL7l4smXiR7VhI9Dzt2D8BGiYkUXhYKl/IgMnA9o+ICKrlck6I xlOyuxuf1ncaOldCwpfLNHNMYwBJGHNCHHY+1dArGdKMnHzupEoLrrul3/GkRoagdZyb UG0IiPKJUmPrI32vkM+IVLyKI59QnDuxkCW7Y9myI8m40SZZ5cFXaySHvrAnbXuVMIZL YoAjwl4fa/2QJk8N9g23s7eLiktUlGUUJQsNUUkvqtF6IypYGyAnNyZnXI4AsMYfezR5 eOtjVGhowuRjVGtS5GJc1zqKLfa63eKQsyWcdc+RcfCoEzLX2LQWEBL/rclHzmqiwnbQ pfWQ== Received: by 10.180.105.163 with SMTP id gn3mr22982966wib.2.1347970096643; Tue, 18 Sep 2012 05:08:16 -0700 (PDT) Received: from ace.home.fr (ppeter.rsr.lip6.fr. [132.227.76.16]) by mx.google.com with ESMTPS id eu4sm22494251wib.2.2012.09.18.05.08.15 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Sep 2012 05:08:16 -0700 (PDT) From: Peter Senna Tschudin To: jayalk@intworks.biz Cc: FlorianSchandinat@gmx.de, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Peter Senna Tschudin Subject: [PATCH 10/10] drivers/video/arcfb.c: fix error return code Date: Tue, 18 Sep 2012 14:08:00 +0200 Message-Id: <1347970080-25175-10-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1347970080-25175-1-git-send-email-peter.senna@gmail.com> References: <1347970080-25175-1-git-send-email-peter.senna@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org From: Peter Senna Tschudin Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Peter Senna Tschudin --- drivers/video/arcfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index a1d58e9..4659d5d 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c @@ -552,6 +552,7 @@ static int __devinit arcfb_probe(struct platform_device *dev) "arcfb", info)) { printk(KERN_INFO "arcfb: Failed req IRQ %d\n", par->irq); + retval = -EBUSY; goto err1; } }