i2c: Fix return value check in i2c-dev
commit3bacb36db01c7541ffea21d4ff39219e8b211a5c
authorAkinobu Mita <akinobu.mita@gmail.com>
Sun, 10 Dec 2006 20:21:33 +0000 (10 21:21 +0100)
committerJean Delvare <khali@arrakis.delvare>
Sun, 10 Dec 2006 20:21:33 +0000 (10 21:21 +0100)
tree52d89e1c11c22e75aabe37c5bbeeb6800e0e247c
parent250d1bd3f4ed0b50d79b3ec81ccefbabb203f916
i2c: Fix return value check in i2c-dev

device_create() returns error code as pointer on failures.
This patch checks the return value of device_create() by using IS_ERR().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/i2c-dev.c