* [PATCH] drivers/misc: beautify code: chip->lux_calib is u16 which will never more than APDS_RANGE
@ 2013-02-27 5:56 Chen Gang
0 siblings, 0 replies; only message in thread
From: Chen Gang @ 2013-02-27 5:56 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Greg KH, linux-kernel@vger.kernel.org
APDS_RANGE is 65535, chip->lux_calib is u16 (never more than APDS_RANGE).
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
drivers/misc/apds990x.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index 0e67f82..1efb6a4 100644
--- a/drivers/misc/apds990x.c
+++ b/drivers/misc/apds990x.c
@@ -700,9 +700,6 @@ static ssize_t apds990x_lux_calib_store(struct device *dev,
if (strict_strtoul(buf, 0, &value))
return -EINVAL;
- if (chip->lux_calib > APDS_RANGE)
- return -EINVAL;
-
chip->lux_calib = value;
return len;
--
1.7.7.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-02-27 5:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27 5:56 [PATCH] drivers/misc: beautify code: chip->lux_calib is u16 which will never more than APDS_RANGE Chen Gang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox