Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755420AbbGZV0o (ORCPT ); Sun, 26 Jul 2015 17:26:44 -0400 Received: from li271-223.members.linode.com ([178.79.152.223]:55690 "EHLO mail.mleia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755295AbbGZV0D (ORCPT ); Sun, 26 Jul 2015 17:26:03 -0400 From: Vladimir Zapolskiy To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Wolfram Sang Subject: [PATCH 6/8] misc: eeprom: at24: clean up at24_bin_write() Date: Mon, 27 Jul 2015 00:18:51 +0300 Message-Id: <1437945533-27996-6-git-send-email-vz@mleia.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437945502-27944-1-git-send-email-vz@mleia.com> References: <1437945502-27944-1-git-send-email-vz@mleia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20150726_222436_605365_C4E72190 X-CRM114-Status: GOOD ( 12.88 ) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1031 Lines: 32 The change removes redundant sysfs binary file boundary check, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy Cc: linux-i2c@vger.kernel.org Cc: Wolfram Sang --- drivers/misc/eeprom/at24.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 2d3db81..6ded3dc 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -438,9 +438,6 @@ static ssize_t at24_bin_write(struct file *filp, struct kobject *kobj, { struct at24_data *at24; - if (unlikely(off >= attr->size)) - return -EFBIG; - at24 = dev_get_drvdata(container_of(kobj, struct device, kobj)); return at24_write(at24, buf, off, count); } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/