Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1637234 > unrolled thread

[PATCH] sm501fb: Silence a coccinelle script warning.

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2017-05-08 08:20 +0200
Last post2017-05-08 08:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] sm501fb: Silence a coccinelle script warning. Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-05-08 08:20 +0200

#1637234 — [PATCH] sm501fb: Silence a coccinelle script warning.

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2017-05-08 08:20 +0200
Subject[PATCH] sm501fb: Silence a coccinelle script warning.
Message-ID<tEKbv-85-15@gated-at.bofh.it>
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 <christophe.jaillet@wanadoo.fr>
---
 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 */
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web