From patchwork Sat Mar 19 04:36:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 645861 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 p2J4YCrN005828 for ; Sat, 19 Mar 2011 04:37:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752139Ab1CSEhJ (ORCPT ); Sat, 19 Mar 2011 00:37:09 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:44081 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751183Ab1CSEhI (ORCPT ); Sat, 19 Mar 2011 00:37:08 -0400 Received: by wwa36 with SMTP id 36so5603144wwa.1 for ; Fri, 18 Mar 2011 21:37:07 -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:mime-version :content-type:content-disposition:user-agent; bh=c7DoBug8BaG879v3E6Er6ed4+IsYlTPbEaNpEX43phA=; b=TdkyBi4XCLqoHv0gL9cInPNexSE/o249wGwAh1dCqG1z66LoMfd6Cnx6FDOtGs0IvC g2crFthPNVEtQsS7ctcms9kkZH+e/LsInKTpZk4L02FbBE0d5MbqyG+vR8l3bbvxxwlK EQK8b1uhUXwLaJRkeE1zISPprwNgjuh77yJj8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=o2hMi9214kfp2GZgLZxXpDB7GhLp5PDgZ4bSplWU2N2s5FUDRM5NQcYj6eRAHJrbHc LhDq1M7ap2hQzVqzayVbZqWPu5rzC4N/XF+UyzUkpY8AF6gk0Z6ZO1uc4EnsGCxG4wGq mQQfz+zyS3LplLB8VPjbmrK+Iqe+K2Tkbk8I4= Received: by 10.216.143.74 with SMTP id k52mr84854wej.0.1300509427014; Fri, 18 Mar 2011 21:37:07 -0700 (PDT) Received: from bicker ([212.49.88.34]) by mx.google.com with ESMTPS id p5sm1675087wbg.28.2011.03.18.21.36.59 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2011 21:37:04 -0700 (PDT) Date: Sat, 19 Mar 2011 07:36:47 +0300 From: Dan Carpenter To: Paul Mundt Cc: Guennadi Liakhovetski , Magnus Damm , linux-fbdev@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR() Message-ID: <20110319043647.GZ2008@bicker> MIME-Version: 1.0 Content-Disposition: inline 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]); Sat, 19 Mar 2011 04:37:10 +0000 (UTC) diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index bf2629f..a53abe1 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -1088,7 +1088,7 @@ 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) { + if (IS_ERR(bl)) { dev_err(parent, "unable to register backlight device\n"); return NULL; }