PD#SWPL-13969
Problem:
In sysfs.c, return value of class_register is not checked.
Solution:
check return value of class_register
Verify:
local coverity check
Change-Id: If8deb3e388e784650e4812257143c3ac919c2d9a
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
int ir_sys_device_attribute_init(struct remote_chip *chip)
{
struct device *dev;
+ int err;
- class_register(&remote_class);
+ err = class_register(&remote_class);
+ if (unlikely(err))
+ return err;
dev = device_create(&remote_class, NULL,
chip->chr_devno, chip, chip->dev_name);