From patchwork Wed Sep 12 06:30:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11344 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 A0A9723E29 for ; Wed, 12 Sep 2012 06:33:08 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 13B163D782F4 for ; Wed, 12 Sep 2012 06:33:07 +0000 (UTC) Received: by iafj25 with SMTP id j25so1023344iaf.11 for ; Tue, 11 Sep 2012 23:33:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=5H3dXGjvrCxvxZ9/wnWTlcZQ5coTLzKPMCK1fxNytzw=; b=ACzyRKRwdHVSn78kRVpUxH5jHOLLx3YNOncmRgmfu18e5eqfAywXo8ZiOUAqqruUMR K2EUYg6kX79faXQ/CskZhA6z2tBMYkbU7sXKlNevRDgK4AvkUZ95tIhzf29004hVFGLw TtgFETY/YfbP1Mh4gBIfErvPEfwsbBbS0U45/r6kc6M+ynfYu0HUwNvtbg/VuPtVilTX sMNOZo6Xryr5OIUU4/X219Yp60ylGTRmTKg7HtZKsY123Emd8minMCkH/SVoacg1agbM 74IfAlb5pezycEdgB/OQuJxDsh2GpjN9E4ozALJPw+SGgNf2ML7Ea6TPkbCXJIjqg7xW uItA== Received: by 10.50.45.162 with SMTP id o2mr19959395igm.0.1347431587382; Tue, 11 Sep 2012 23:33:07 -0700 (PDT) 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.50.184.232 with SMTP id ex8csp53929igc; Tue, 11 Sep 2012 23:33:06 -0700 (PDT) Received: by 10.68.242.231 with SMTP id wt7mr15390901pbc.99.1347431586107; Tue, 11 Sep 2012 23:33:06 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id pb4si12459469pbc.180.2012.09.11.23.33.05 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Sep 2012 23:33:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by dade7 with SMTP id e7so945160dad.37 for ; Tue, 11 Sep 2012 23:33:05 -0700 (PDT) Received: by 10.68.213.138 with SMTP id ns10mr15469369pbc.157.1347431585449; Tue, 11 Sep 2012 23:33:05 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id it6sm10948352pbc.14.2012.09.11.23.33.02 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Sep 2012 23:33:04 -0700 (PDT) From: Sachin Kamat To: linux-serial@vger.kernel.org Cc: alan@linux.intel.com, gregkh@linuxfoundation.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] serial: Samsung: Fix return value Date: Wed, 12 Sep 2012 12:00:01 +0530 Message-Id: <1347431401-3306-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkeSH0UH50WqlqPLrBrFSLi572qwm7aBvK5IWV9BX4LNaGUhQlhZmgMrir2TVkKO4pEEDkT Return the value returned by the failing function instead of -1 (which does not convey the right error information). Fixes the following smatch warning: drivers/tty/serial/samsung.c:1687 s3c24xx_serial_modinit() info: why not propagate 'ret' from uart_register_driver() instead of -1? Signed-off-by: Sachin Kamat --- drivers/tty/serial/samsung.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index bdaa06f..8eef114 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1684,7 +1684,7 @@ static int __init s3c24xx_serial_modinit(void) ret = uart_register_driver(&s3c24xx_uart_drv); if (ret < 0) { pr_err("Failed to register Samsung UART driver\n"); - return -1; + return ret; } return platform_driver_register(&samsung_serial_driver);