From patchwork Mon Dec 31 18:18:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devendra Naga X-Patchwork-Id: 1921741 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 DAA50DFF38 for ; Mon, 31 Dec 2012 18:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751517Ab2LaSSo (ORCPT ); Mon, 31 Dec 2012 13:18:44 -0500 Received: from mail-da0-f45.google.com ([209.85.210.45]:42763 "EHLO mail-da0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751508Ab2LaSSn (ORCPT ); Mon, 31 Dec 2012 13:18:43 -0500 Received: by mail-da0-f45.google.com with SMTP id w4so5832471dam.18 for ; Mon, 31 Dec 2012 10:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=JoAxWm1BYCMPGzgpKACR1SINKSzNMcJDPqerCd5G7jQ=; b=MBoWHcVbFhM5QcptjhbSU5HbVXfTajlju7sAUu/Lf8rKt4cphvF6OmyeaTyDfttIcO gbk78Dc+++9HRb4Aln7ZDFUk0L7iWf5DSGLcpKNpTEXEKUbIkuJP5936hJrtasUYFFWg iSb8pM/42b4snUqfcshDDs2mHFXDbkoxlX1A7qPg+9iRrdgb/Wm5fUm1ZsFh7VfUwWAe nBo8XMIdIt8dMz2Ab9aZy+Rf4IW/ol0qbLMPbiwpAAYtF88ZY48ZzSXLNy5E/RyXt+cf V7jdy8WvlMXV/16uCv7ztXQa2SC8BHyXMvxE2cbDyQ5NcwEcpr7Qmo61NGy25tcnG2ex K8kQ== X-Received: by 10.68.248.74 with SMTP id yk10mr130122891pbc.86.1356977922142; Mon, 31 Dec 2012 10:18:42 -0800 (PST) Received: from localhost.localdomain ([122.172.40.120]) by mx.google.com with ESMTPS id uk9sm25220873pbc.63.2012.12.31.10.18.39 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 31 Dec 2012 10:18:41 -0800 (PST) From: Devendra Naga To: Andrew Morton , linux-fbdev@vger.kernel.org Cc: Devendra Naga , Daniel Jeong , "G.Shark Jeong" Subject: [PATCH] backlight: lm3649_backlight: remove ret = -EIO at error paths of probe Date: Mon, 31 Dec 2012 13:18:31 -0500 Message-Id: <1356977911-13521-1-git-send-email-devendra.aaru@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org the APIs are returning correctly the err codes, no need of assigning -EIO to the ret again Cc: Daniel Jeong Cc: G.Shark Jeong Signed-off-by: Devendra Naga --- drivers/video/backlight/lm3639_bl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c index 7ab2d2a..053964d 100644 --- a/drivers/video/backlight/lm3639_bl.c +++ b/drivers/video/backlight/lm3639_bl.c @@ -350,14 +350,13 @@ static int lm3639_probe(struct i2c_client *client, &lm3639_bled_ops, &props); if (IS_ERR(pchip->bled)) { dev_err(&client->dev, "fail : backlight register\n"); - ret = -EIO; + ret = PTR_ERR(pchip->bled); goto err_out; } ret = device_create_file(&(pchip->bled->dev), &dev_attr_bled_mode); if (ret < 0) { dev_err(&client->dev, "failed : add sysfs entries\n"); - ret = -EIO; goto err_bled_mode; } @@ -369,7 +368,6 @@ static int lm3639_probe(struct i2c_client *client, &client->dev, &pchip->cdev_flash); if (ret < 0) { dev_err(&client->dev, "fail : flash register\n"); - ret = -EIO; goto err_flash; } @@ -381,7 +379,6 @@ static int lm3639_probe(struct i2c_client *client, &client->dev, &pchip->cdev_torch); if (ret < 0) { dev_err(&client->dev, "fail : torch register\n"); - ret = -EIO; goto err_torch; }