Re: [PATCH] fix Coverity braindamage in UDF

From: Andrew Morton
Date: Wed Jun 29 2005 - 02:18:02 EST


Christoph Hellwig <hch@xxxxxx> wrote:
>
> Andrew, please don't blindly apply Coverity patches. While the checker
> is smart at finding inconsistencies, that "obvious" fix is wrong most of
> the item. As in this unreviewed UDF patch that got in:
> udf_find_entry can never be called with a NULL argument, so we shouldn't
> check for it instead of adding more assignments behind the check.

I reviewed it. The code as it stood was wrong and the patch corrected it.

Yes, I realised at the time that the test for null is probably redundant,
but that's a separate thing - we have many such redundant tests and perhaps
someone should do a cleanup sweep. But I have no intention of doing that
and I don't want to be leaving obvious coding errors in there.

A similar argument applies to the patch "coverity: tty_ldisc_ref return
null check".
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/