From patchwork Thu Apr 14 08:17:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Yuan X-Patchwork-Id: 706441 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 p3E8I5Ns014016 for ; Thu, 14 Apr 2011 08:18:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751600Ab1DNISE (ORCPT ); Thu, 14 Apr 2011 04:18:04 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:38929 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751281Ab1DNISC (ORCPT ); Thu, 14 Apr 2011 04:18:02 -0400 Received: by iyb14 with SMTP id 14so1246587iyb.19 for ; Thu, 14 Apr 2011 01:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:content-transfer-encoding; bh=IDO/X0jSRMTOsijdqAToV/6cu+aIhzwENcBj0itIbmg=; b=Afky7j3Cr8CmNt2fRLQTQtob9HtZLhi3OvtiAAEen8nAM+Hf13k28KI8RKrcfqdfL8 UrsJrpDI8rKH6REc7n+bHyc5iaRlxoHUr3loR4txyFbJmLvnk+466zOv0xEGGH2/u8Fz 4df5RJmVJn9kmS9Zto0Uz5WZemDB02DDXiXdc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=ikKFVzJlGYbzwna43XEdFYNbb8EGEdHlAdWX0B6f4ZcJdsdjfoTKg1QiRP3q4AEE4a lMvrFl7D5pCA6Ijc45rEn+keDlaiAgy1Tx+PgzM3FH+RSrOJzkuWfLr2SaU2Oz+7vR1y FcUC50JLU3ezxJ1iB53jr1E/BlfXIoQW5kFTg= Received: by 10.42.117.137 with SMTP id t9mr643707icq.277.1302769081351; Thu, 14 Apr 2011 01:18:01 -0700 (PDT) Received: from localhost.localdomain ([114.251.86.0]) by mx.google.com with ESMTPS id hc41sm1033438ibb.13.2011.04.14.01.17.57 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Apr 2011 01:18:00 -0700 (PDT) From: Liu Yuan To: Paul Mundt Cc: linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] video, udlfb: Fix two build warning about 'ignoring return value' Date: Thu, 14 Apr 2011 16:17:50 +0800 Message-Id: <1302769070-21670-1-git-send-email-namei.unix@gmail.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 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]); Thu, 14 Apr 2011 08:18:06 +0000 (UTC) From: Liu Yuan Build warning: ... drivers/video/udlfb.c:1590: warning: ignoring return value of ‘device_create_file’, declared with attribute warn_unused_result drivers/video/udlfb.c:1592: warning: ignoring return value of ‘device_create_bin_file’, declared with attribute warn_unused_result So add two checks to get rid of 'em. Signed-off-by: Liu Yuan --- drivers/video/udlfb.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 68041d9..55d6de6 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c @@ -1586,10 +1586,19 @@ static int dlfb_usb_probe(struct usb_interface *interface, goto error; } - for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) - device_create_file(info->dev, &fb_device_attrs[i]); + for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) { + retval = device_create_file(info->dev, &fb_device_attrs[i]); + if (retval) { + pr_err("device_create_file failed %d\n", retval); + goto error; + } + } - device_create_bin_file(info->dev, &edid_attr); + retval = device_create_bin_file(info->dev, &edid_attr); + if (retval) { + pr_err("device_create_bin_file failed %d\n", retval); + goto error; + } pr_info("DisplayLink USB device /dev/fb%d attached. %dx%d resolution." " Using %dK framebuffer memory\n", info->node,