All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [video/fbdev] fb_flashcursor: Remove redundant null check
@ 2020-07-26  5:07 ` Gaurav Singh
  0 siblings, 0 replies; 6+ messages in thread
From: Gaurav Singh @ 2020-07-26  5:07 UTC (permalink / raw)
  To: gaurav1086, Bartlomiej Zolnierkiewicz, Daniel Vetter,
	Qiujun Huang, Sam Ravnborg, Geert Uytterhoeven, Peter Rosin,
	Nathan Chancellor, open list:FRAMEBUFFER LAYER,
	open list:FRAMEBUFFER LAYER, open list

ops cannot be NULL as its being accessed later without
checks. Remove the redundant NULL check. 

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
 drivers/video/fbdev/core/fbcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index e2a490c5ae08..9551f40c6d14 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -401,7 +401,7 @@ static void fb_flashcursor(struct work_struct *work)
 	if (ret == 0)
 		return;
 
-	if (ops && ops->currcon != -1)
+	if (ops->currcon != -1)
 		vc = vc_cons[ops->currcon].d;
 
 	if (!vc || !con_is_visible(vc) ||
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] [video/fbdev] fb_flashcursor: Remove redundant null check
@ 2020-07-26  5:07 ` Gaurav Singh
  0 siblings, 0 replies; 6+ messages in thread
From: Gaurav Singh @ 2020-07-26  5:07 UTC (permalink / raw)
  To: gaurav1086, Bartlomiej Zolnierkiewicz, Daniel Vetter,
	Qiujun Huang, Sam Ravnborg, Geert Uytterhoeven, Peter Rosin,
	Nathan Chancellor, open list:FRAMEBUFFER LAYER,
	open list:FRAMEBUFFER LAYER, open list

ops cannot be NULL as its being accessed later without
checks. Remove the redundant NULL check. 

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
 drivers/video/fbdev/core/fbcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index e2a490c5ae08..9551f40c6d14 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -401,7 +401,7 @@ static void fb_flashcursor(struct work_struct *work)
 	if (ret = 0)
 		return;
 
-	if (ops && ops->currcon != -1)
+	if (ops->currcon != -1)
 		vc = vc_cons[ops->currcon].d;
 
 	if (!vc || !con_is_visible(vc) ||
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] [video/fbdev] fb_flashcursor: Remove redundant null check
@ 2020-07-26  5:07 ` Gaurav Singh
  0 siblings, 0 replies; 6+ messages in thread
From: Gaurav Singh @ 2020-07-26  5:07 UTC (permalink / raw)
  To: gaurav1086, Bartlomiej Zolnierkiewicz, Daniel Vetter,
	Qiujun Huang, Sam Ravnborg, Geert Uytterhoeven, Peter Rosin,
	Nathan Chancellor, open list:FRAMEBUFFER LAYER,
	open list:FRAMEBUFFER LAYER, open list

ops cannot be NULL as its being accessed later without
checks. Remove the redundant NULL check. 

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
 drivers/video/fbdev/core/fbcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index e2a490c5ae08..9551f40c6d14 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -401,7 +401,7 @@ static void fb_flashcursor(struct work_struct *work)
 	if (ret == 0)
 		return;
 
-	if (ops && ops->currcon != -1)
+	if (ops->currcon != -1)
 		vc = vc_cons[ops->currcon].d;
 
 	if (!vc || !con_is_visible(vc) ||
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] [video/fbdev] fb_flashcursor: Remove redundant null check
  2020-07-26  5:07 ` Gaurav Singh
  (?)
@ 2020-07-26  8:58   ` Andy Shevchenko
  -1 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2020-07-26  8:58 UTC (permalink / raw)
  To: Gaurav Singh
  Cc: Bartlomiej Zolnierkiewicz, Daniel Vetter, Qiujun Huang,
	Sam Ravnborg, Geert Uytterhoeven, Peter Rosin, Nathan Chancellor,
	open list:FRAMEBUFFER LAYER, open list:FRAMEBUFFER LAYER,
	open list

On Sun, Jul 26, 2020 at 8:17 AM Gaurav Singh <gaurav1086@gmail.com> wrote:
>
> ops cannot be NULL as its being accessed later without

it's

> checks. Remove the redundant NULL check.

Commit message doesn't clarify why your fix is the correct one.
Maybe it's the other way around, missed check in the rest of the code there?

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [video/fbdev] fb_flashcursor: Remove redundant null check
@ 2020-07-26  8:58   ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2020-07-26  8:58 UTC (permalink / raw)
  To: Gaurav Singh
  Cc: open list:FRAMEBUFFER LAYER, Bartlomiej Zolnierkiewicz,
	Daniel Vetter, open list, open list:FRAMEBUFFER LAYER,
	Geert Uytterhoeven, Nathan Chancellor, Sam Ravnborg, Peter Rosin,
	Qiujun Huang

On Sun, Jul 26, 2020 at 8:17 AM Gaurav Singh <gaurav1086@gmail.com> wrote:
>
> ops cannot be NULL as its being accessed later without

it's

> checks. Remove the redundant NULL check.

Commit message doesn't clarify why your fix is the correct one.
Maybe it's the other way around, missed check in the rest of the code there?

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [video/fbdev] fb_flashcursor: Remove redundant null check
@ 2020-07-26  8:58   ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2020-07-26  8:58 UTC (permalink / raw)
  To: Gaurav Singh
  Cc: open list:FRAMEBUFFER LAYER, Bartlomiej Zolnierkiewicz,
	Daniel Vetter, open list, open list:FRAMEBUFFER LAYER,
	Geert Uytterhoeven, Nathan Chancellor, Sam Ravnborg, Peter Rosin,
	Qiujun Huang

On Sun, Jul 26, 2020 at 8:17 AM Gaurav Singh <gaurav1086@gmail.com> wrote:
>
> ops cannot be NULL as its being accessed later without

it's

> checks. Remove the redundant NULL check.

Commit message doesn't clarify why your fix is the correct one.
Maybe it's the other way around, missed check in the rest of the code there?

-- 
With Best Regards,
Andy Shevchenko
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-26 15:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26  5:07 [PATCH] [video/fbdev] fb_flashcursor: Remove redundant null check Gaurav Singh
2020-07-26  5:07 ` Gaurav Singh
2020-07-26  5:07 ` Gaurav Singh
2020-07-26  8:58 ` Andy Shevchenko
2020-07-26  8:58   ` Andy Shevchenko
2020-07-26  8:58   ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.