From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: gracefully bail out when init_clock_gating-pointer is not set Date: Mon, 20 Jun 2011 17:43:22 +0100 Message-ID: <013811$hje8d@fmsmga002.fm.intel.com> References: <013811$h8fkv@fmsmga002.fm.intel.com> <1308586230-22484-1-git-send-email-w.sang@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 65EDB9E763 for ; Mon, 20 Jun 2011 09:43:30 -0700 (PDT) In-Reply-To: <1308586230-22484-1-git-send-email-w.sang@pengutronix.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: Wolfram Sang List-Id: dri-devel@lists.freedesktop.org On Mon, 20 Jun 2011 18:10:30 +0200, Wolfram Sang wrote: > Commit 6067aa (drm/i915: split clock gating init into per-chipset > functions) introduces an init_clock_gating-pointer. There is one case, > however, where it does not get set, so that caused an OOPS (Bug 37252). > Change the code to return -ENODEV in this case and propagate it to the > upper layers. That's better, the system will continue to boot now and we will have an appropriate error message. > - } else > - dev_priv->display.update_wm = NULL; > + } else { > + dev_err(dev->dev, "Unknown type!\n"); DRM_ERROR("Unknown chipset: %lx\n", dev->pci_device); > + return -ENODEV; > + } DRM_ERROR to be in keeping with the rest of the code, and a bit of context in case the error is ever pasted into bugzilla.kernel.org. -Chris -- Chris Wilson, Intel Open Source Technology Centre