From patchwork Wed Dec 28 16:48:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9490515 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5184B60838 for ; Wed, 28 Dec 2016 16:48:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1150620144 for ; Wed, 28 Dec 2016 16:48:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0294B2623C; Wed, 28 Dec 2016 16:48:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A2C7520144 for ; Wed, 28 Dec 2016 16:48:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AEB3D891D1; Wed, 28 Dec 2016 16:48:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x241.google.com (mail-qk0-x241.google.com [IPv6:2607:f8b0:400d:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62AE5891D1 for ; Wed, 28 Dec 2016 16:48:45 +0000 (UTC) Received: by mail-qk0-x241.google.com with SMTP id n21so32650610qka.0 for ; Wed, 28 Dec 2016 08:48:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=b5BMoH1XCt0d6cwXBgjEnO1Vbtzha8krSV+EWHaYbEA=; b=ha7MICy+YMSReKVikyfJdWh9VW+SmuusuUQEzLffUffPZVjUcYjwMAY0L7lz8kpuyl Pf/43jRedKi2QCEqY9IbSEMrq9Bw+bYgFdGFT1TRSkA6rkFDZuI3BblRkKwLqaK4RGRx mnLROjjPSTWts2N2/+1UjEHhm9D8JtdVdlfgkUDVWSxYUwOO0EZgIH06NtxQN5QOp/wc BkVG5M0+VQRK3pO2cwc6JHrnpHhIL5cKyN7hK7+eAZ+//zZDeMEeIaLsa4ErX7mH0doS zxCQckBUdv2CQqYW7eFihXZxKReXpa5lEoghEKNVpbT0GRmt2koGig3NV5Brh/w/ByF2 aRlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=b5BMoH1XCt0d6cwXBgjEnO1Vbtzha8krSV+EWHaYbEA=; b=Jz0ckR0iO7aoYFV9A8NX5gH1RbHYt1CUPCJIR0M39ktUZlXHIgRJ3q+jZhaTg8L2A6 zqCiMwfbKXqql3JAZZ1lCm5s58f1z6u/zR8Tb+CmxHgfxSwibCnO2oFD2eX0+JCcnQlF 6UWx4VTEkrHkCZjlKwjIiNEVZZnRzs2SNIkC6DWwyzEFpEEqaLGWfywQ58tjS73LVMsE M8WyvZLtwG9kFAymJgi8lR25TJcxlvjPk9lqIe+aa0cHGm50f7csifNTLX31GK3SZ8KQ Jpw3pTe9jZG+Tg4vsqddJkPLi4XZS4teB4P/NypysPnkFb5LmMACTOCiAj5OFPg09ZQ7 vrLA== X-Gm-Message-State: AIkVDXKFuEgG/PhBOhHhhteysTmoVrYXPpDfMjHJP8y5fq4s2nj0U0TGrba9F7ZuHpXuUA== X-Received: by 10.55.55.143 with SMTP id e137mr34320562qka.237.1482943724331; Wed, 28 Dec 2016 08:48:44 -0800 (PST) Received: from localhost.localdomain ([187.180.187.205]) by smtp.gmail.com with ESMTPSA id s41sm30990765qtc.39.2016.12.28.08.48.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Dec 2016 08:48:43 -0800 (PST) From: Fabio Estevam To: stefan@agner.ch Subject: [PATCH 1/2] drm/fsl-dcu: remove unneeded 'ret' assignment Date: Wed, 28 Dec 2016 14:48:47 -0200 Message-Id: <1482943728-29421-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: Fabio Estevam , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam When devm_kzalloc() fails there is no need to assign an error code to the 'ret' variable as it will not be used after jumping to the 'err_node_put' label, so just remove the assignment. Signed-off-by: Fabio Estevam Reviewed-by: Gabriel Krisman Bertazi --- drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c index 3194e54..2fbb7ee 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c @@ -72,10 +72,8 @@ struct fsl_tcon *fsl_tcon_init(struct device *dev) return NULL; tcon = devm_kzalloc(dev, sizeof(*tcon), GFP_KERNEL); - if (!tcon) { - ret = -ENOMEM; + if (!tcon) goto err_node_put; - } ret = fsl_tcon_init_regmap(dev, tcon, np); if (ret) {