Re: char/cyclades.c: inconsequent NULL checking

2007-10-22 Thread Adrian Bunk
On Mon, Oct 22, 2007 at 09:12:23PM +0200, Jiri Kosina wrote:
> On Mon, 22 Oct 2007, Jiri Slaby wrote:
> 
> > > The Coverity checker spotted the following inconsequent NULL checking in 
> > Where can one obtain such a checker?
> 
> That's a commercial proprietary thingie.
> 
> http://www.coverity.com/

A bit more of background:

The US Department of Homeland Security pays them some money for scanning 
open source projects, the Linux kernel is one of these projects, and 
kernel developers can therefore get access to the database with the
results from their regular scans of Linus' tree.

I'm not a fan of proprietary software, but I'm simply considering their 
results as bug reports that are worth looking at.

> Jiri Kosina

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: char/cyclades.c: inconsequent NULL checking

2007-10-22 Thread Jiri Kosina
On Mon, 22 Oct 2007, Jiri Slaby wrote:

> > The Coverity checker spotted the following inconsequent NULL checking in 
> Where can one obtain such a checker?

That's a commercial proprietary thingie.

http://www.coverity.com/

-- 
Jiri Kosina
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: char/cyclades.c: inconsequent NULL checking

2007-10-22 Thread Jiri Slaby
On 10/22/2007 04:47 AM, Adrian Bunk wrote:
> The Coverity checker spotted the following inconsequent NULL checking in 

Where can one obtain such a checker?

> drivers/char/cyclades.c:
> 
> <--  snip  -->
> 
> ...
> static void cyz_handle_tx(struct cyclades_port *info,
> struct BUF_CTRL __iomem *buf_ctrl)
> {
> struct cyclades_card *cinfo = info->card;
> struct tty_struct *tty = info->tty;
> ...
> if (tty == NULL)
> goto ztxdone;
> ...
> tty_wakeup(tty);
> ...
> 
> <--  snip  -->

patch on route, thanks,
-- 
Jiri Slaby ([EMAIL PROTECTED])
Faculty of Informatics, Masaryk University
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: char/cyclades.c: inconsequent NULL checking

2007-10-22 Thread Jiri Slaby
On 10/22/2007 04:47 AM, Adrian Bunk wrote:
 The Coverity checker spotted the following inconsequent NULL checking in 

Where can one obtain such a checker?

 drivers/char/cyclades.c:
 
 --  snip  --
 
 ...
 static void cyz_handle_tx(struct cyclades_port *info,
 struct BUF_CTRL __iomem *buf_ctrl)
 {
 struct cyclades_card *cinfo = info-card;
 struct tty_struct *tty = info-tty;
 ...
 if (tty == NULL)
 goto ztxdone;
 ...
 tty_wakeup(tty);
 ...
 
 --  snip  --

patch on route, thanks,
-- 
Jiri Slaby ([EMAIL PROTECTED])
Faculty of Informatics, Masaryk University
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: char/cyclades.c: inconsequent NULL checking

2007-10-22 Thread Jiri Kosina
On Mon, 22 Oct 2007, Jiri Slaby wrote:

  The Coverity checker spotted the following inconsequent NULL checking in 
 Where can one obtain such a checker?

That's a commercial proprietary thingie.

http://www.coverity.com/

-- 
Jiri Kosina
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: char/cyclades.c: inconsequent NULL checking

2007-10-22 Thread Adrian Bunk
On Mon, Oct 22, 2007 at 09:12:23PM +0200, Jiri Kosina wrote:
 On Mon, 22 Oct 2007, Jiri Slaby wrote:
 
   The Coverity checker spotted the following inconsequent NULL checking in 
  Where can one obtain such a checker?
 
 That's a commercial proprietary thingie.
 
 http://www.coverity.com/

A bit more of background:

The US Department of Homeland Security pays them some money for scanning 
open source projects, the Linux kernel is one of these projects, and 
kernel developers can therefore get access to the database with the
results from their regular scans of Linus' tree.

I'm not a fan of proprietary software, but I'm simply considering their 
results as bug reports that are worth looking at.

 Jiri Kosina

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


char/cyclades.c: inconsequent NULL checking

2007-10-21 Thread Adrian Bunk
The Coverity checker spotted the following inconsequent NULL checking in 
drivers/char/cyclades.c:

<--  snip  -->

...
static void cyz_handle_tx(struct cyclades_port *info,
struct BUF_CTRL __iomem *buf_ctrl)
{
struct cyclades_card *cinfo = info->card;
struct tty_struct *tty = info->tty;
...
if (tty == NULL)
goto ztxdone;
...
tty_wakeup(tty);
...

<--  snip  -->

Nothing in cyz_handle_tx() seems to change "tty".

The "tty_wakeup(tty);" was added in commit 
ebafeeff0fea029099e9952f233e0794106897a6.

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


char/cyclades.c: inconsequent NULL checking

2007-10-21 Thread Adrian Bunk
The Coverity checker spotted the following inconsequent NULL checking in 
drivers/char/cyclades.c:

--  snip  --

...
static void cyz_handle_tx(struct cyclades_port *info,
struct BUF_CTRL __iomem *buf_ctrl)
{
struct cyclades_card *cinfo = info-card;
struct tty_struct *tty = info-tty;
...
if (tty == NULL)
goto ztxdone;
...
tty_wakeup(tty);
...

--  snip  --

Nothing in cyz_handle_tx() seems to change tty.

The tty_wakeup(tty); was added in commit 
ebafeeff0fea029099e9952f233e0794106897a6.

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/