From patchwork Mon Mar 21 15:03:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 648181 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2LF5Ojo020435 for ; Mon, 21 Mar 2011 15:05:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753699Ab1CUPFK (ORCPT ); Mon, 21 Mar 2011 11:05:10 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:43432 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753690Ab1CUPFG (ORCPT ); Mon, 21 Mar 2011 11:05:06 -0400 Received: by fxm17 with SMTP id 17so5550878fxm.19 for ; Mon, 21 Mar 2011 08:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=I8iWuYrUwXt2yDNAEt8wf/+FV5fox17CdsMI+U4Mix0=; b=VdSZ0r0Kgy58xVm6xzANIhP0g2yOInG67hiRhFJEb7Ez42dwhv/0Xm7VyvYo1cf9XY kU577Rsd8U2TDIc4bGFXoeP0bkK+tLCA5Zc+QXwx7CabbSSxY5ReYAC1QriI+EY+u1EL hvLL/Eh7WrglA9yjpOXl/F/wyROqNvdSK0f3E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=GqB44NwKCTpeHJrgn+Huvrr7hShOGoXswOu9RSlEVhWNndm/O2VEVSWEq+xqgOeJIL XANfScK/jB847ZAvCwejbFV0Mv9sTwJObOXXb3Vphjb5KHBW26LiLA+kewWc/j9av/g0 NRmbP2jEilSWkQdg6kfdTuFPv/zFfvVaMOyJs= Received: by 10.223.15.72 with SMTP id j8mr5098084faa.69.1300719845517; Mon, 21 Mar 2011 08:04:05 -0700 (PDT) Received: from bicker ([212.49.88.34]) by mx.google.com with ESMTPS id c24sm2201367fak.31.2011.03.21.08.03.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Mar 2011 08:03:58 -0700 (PDT) Date: Mon, 21 Mar 2011 18:03:13 +0300 From: Dan Carpenter To: "Janorkar, Mayuresh" Cc: Guennadi Liakhovetski , Magnus Damm , "linux-fbdev@vger.kernel.org" , "kernel-janitors@vger.kernel.org" , Paul Mundt Subject: [patch v2] fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR() Message-ID: <20110321150313.GQ2008@bicker> References: <20110319043647.GZ2008@bicker> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 21 Mar 2011 15:05:25 +0000 (UTC) diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index bf2629f..757665b 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -1088,8 +1088,9 @@ static struct backlight_device *sh_mobile_lcdc_bl_probe(struct device *parent, bl = backlight_device_register(ch->cfg.bl_info.name, parent, ch, &sh_mobile_lcdc_bl_ops, NULL); - if (!bl) { - dev_err(parent, "unable to register backlight device\n"); + if (IS_ERR(bl)) { + dev_err(parent, "unable to register backlight device: %ld\n", + PTR_ERR(bl)); return NULL; }