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>
1 file changed