misc/at24: avoid infinite loop on write()
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Mon, 28 Oct 2013 17:05:15 +0000 (19:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2013 23:24:33 +0000 (16:24 -0700)
commit7c65e29250a3154cac18b527b6ccfc61f8f08c58
treed9f6f559b4f85249eba7b59b30aed91a905bf9ec
parent95f774c5268843e78fdb732cd4f27e510bbbba83
misc/at24: avoid infinite loop on write()

This change fixes a problem of infinite zero byte write() without
an error status, if there is an attempt to write a file bigger than
EEPROM size over sysfs interface.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/at24.c