Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262444AbVC2GSY (ORCPT ); Tue, 29 Mar 2005 01:18:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262445AbVC2GSX (ORCPT ); Tue, 29 Mar 2005 01:18:23 -0500 Received: from iabervon.org ([66.92.72.58]:6151 "EHLO iabervon.org") by vger.kernel.org with ESMTP id S262444AbVC2GSR (ORCPT ); Tue, 29 Mar 2005 01:18:17 -0500 Date: Tue, 29 Mar 2005 01:05:55 -0500 (EST) From: Daniel Barkalow To: "L. A. Walsh" cc: linux-kernel@vger.kernel.org, Adrian Bunk , Jean Delvare Subject: Re: Do not misuse Coverity please (Was: sound/oss/cs46xx.c: fix a check after use) In-Reply-To: <424899D7.1080407@tlinx.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 801 Lines: 21 On Mon, 28 Mar 2005, L. A. Walsh wrote: > However, in this case, if the author is _certain_ the > pointer can never be NULL, than an "ASSERT(card!=NULL);" might > be appropriate, where ASSERT is a macro that normally compiles > in the check, but could compile to "nothing" for embedded or > kernels that aren't being developed in. If the kernel dereferences a NULL pointer, it produces an extensive bug report. The automatic oops is about the most useful thing to do if a pointer is unexpectedly NULL. -Daniel *This .sig left intentionally blank* - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/