From patchwork Sat Mar 14 15:38:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 6011561 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6E5089F399 for ; Sat, 14 Mar 2015 15:38:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9530F201BC for ; Sat, 14 Mar 2015 15:38:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 833BC201F4 for ; Sat, 14 Mar 2015 15:38:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751934AbbCNPii (ORCPT ); Sat, 14 Mar 2015 11:38:38 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:42393 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810AbbCNPih (ORCPT ); Sat, 14 Mar 2015 11:38:37 -0400 Received: from avalon.access.wifiservice.net (unknown [31.221.87.81]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 32B2E2000F; Sat, 14 Mar 2015 16:37:27 +0100 (CET) From: Laurent Pinchart To: linux-fbdev@vger.kernel.org Cc: linux-sh@vger.kernel.org, Geert Uytterhoeven , Dan Carpenter Subject: [PATCH] video: fbdev: sh_mobile_lcdcfb: Fix ROP3 sysfs attribute parsing Date: Sat, 14 Mar 2015 17:38:39 +0200 Message-Id: <1426347519-2541-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.0.5 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ROP3 attribute is expressed as an integer in the 0-255 range. Remove the wrong conversion to boolean when parsing it. Reported-by: Dan Carpenter Signed-off-by: Laurent Pinchart Acked-by: Geert Uytterhoeven --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index d3013cd9f976..23421ec1c4e4 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -1461,7 +1461,7 @@ overlay_rop3_store(struct device *dev, struct device_attribute *attr, unsigned int rop3; char *endp; - rop3 = !!simple_strtoul(buf, &endp, 10); + rop3 = simple_strtoul(buf, &endp, 10); if (isspace(*endp)) endp++;