eeprom: ee1004: Improve creating dummy devices
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 24 May 2021 20:13:12 +0000 (22:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 May 2021 12:49:39 +0000 (14:49 +0200)
commit3c03dad7652ee2b30728a263905de93a79205477
tree793b11827bb40be9d0a2f4d2a86208a847497206
parent08e5138aa419350d0a168abeac3ecec4b7e779be
eeprom: ee1004: Improve creating dummy devices

i2c_new_dummy_device() calls i2c_new_client_device() that complains
if it fails to create the device. Therefore we don't have to emit an
error message in case of failure. In addition ensure that
ee1004_set_page is only set if creating the device succeeded.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/d38df5ac-6ecb-7d5f-b5c3-39bfc6a1e8a1@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/ee1004.c