mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
ir: fix coverity unchecked return value issue [1/1]
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>
This commit is contained in:
@@ -523,8 +523,11 @@ static struct class remote_class = {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user