From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QorqG-00035h-Rp for qemu-devel@nongnu.org; Thu, 04 Aug 2011 02:55:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QorqF-0005Os-Nz for qemu-devel@nongnu.org; Thu, 04 Aug 2011 02:55:40 -0400 From: Markus Armbruster References: <1312411744-9292-1-git-send-email-peter.maydell@linaro.org> Date: Thu, 04 Aug 2011 08:55:34 +0200 In-Reply-To: <1312411744-9292-1-git-send-email-peter.maydell@linaro.org> (Peter Maydell's message of "Wed, 3 Aug 2011 23:49:04 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] hw/qdev: Don't crash if qdev_create(NULL, ...) fails List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org Peter Maydell writes: > If an attempt to create a qdev device on the default sysbus (by passing > NULL as the bus to qdev_create) fails, print a useful error message > rather than crashing trying to dereference a NULL pointer. The special case bus == NULL is ugly, and should be removed. But rejecting simple bug fixes because we want some cleanup would be blackmail, and only hurts users. Reviewed-by: Markus Armbruster