From patchwork Mon May 8 06:11:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 9715813 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 901F56035D for ; Mon, 8 May 2017 06:11:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8010127C0B for ; Mon, 8 May 2017 06:11:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7321227F07; Mon, 8 May 2017 06:11:52 +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=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3285627C0B for ; Mon, 8 May 2017 06:11:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752070AbdEHGLj (ORCPT ); Mon, 8 May 2017 02:11:39 -0400 Received: from smtp13.smtpout.orange.fr ([80.12.242.135]:57245 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752022AbdEHGLi (ORCPT ); Mon, 8 May 2017 02:11:38 -0400 Received: from localhost.localdomain ([92.140.222.140]) by mwinf5d72 with ME id HiBa1v00H32MefQ03iBaqr; Mon, 08 May 2017 08:11:36 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 08 May 2017 08:11:36 +0200 X-ME-IP: 92.140.222.140 From: Christophe JAILLET To: b.zolnierkie@samsung.com, khoroshilov@ispras.ru Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] sm501fb: Silence a coccinelle script warning. Date: Mon, 8 May 2017 08:11:16 +0200 Message-Id: <20170508061116.31471-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.11.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to surrounding goto, it is likely that 'goto err_probed_panel' is expected here. This change is just done in order to silence some coccinelle scripts which try to detect wrongly ordered goto. If 'info->fb[HEAD_PANEL]' and' 'info->fb[HEAD_CRT]' are both NULL, this means that no 'framebuffer_alloc' has been performed, so 'goto err_alloc' looks fine. Anyway, it is also harmless in this case to call 'framebuffer_release'. The code looks more straight forward. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/sm501fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c index 67e314fdd947..4d89b045ce40 100644 --- a/drivers/video/fbdev/sm501fb.c +++ b/drivers/video/fbdev/sm501fb.c @@ -1990,7 +1990,7 @@ static int sm501fb_probe(struct platform_device *pdev) info->fb[HEAD_CRT] == NULL) { dev_err(dev, "no framebuffers found\n"); ret = -ENODEV; - goto err_alloc; + goto err_probed_panel; } /* get the resources for both of the framebuffers */