When sysfs_create_group fails, the lack of error-handling code may
cause unexpected results.
This patch adds error-handling code after calling sysfs_create_group.
Signed-off-by: Zhouyang Jia <redacted>
---
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 4 ++++
1 file changed, 4 insertions(+)
You have to do more than this to cleanup. For example, you have to
change the LED state back, as it has just been set to indicate that
the interface is operational.
When sysfs_create_group fails, the lack of error-handling code may
cause unexpected results.
This patch adds error-handling code after calling sysfs_create_group.
Signed-off-by: Zhouyang Jia <redacted>
---
v1->v2:
- Turn off led when sysfs_create_group fails
---
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 7 +++++++
1 file changed, 7 insertions(+)
When sysfs_create_group fails, the lack of error-handling code may
cause unexpected results.
This patch adds error-handling code after calling sysfs_create_group.
Signed-off-by: Zhouyang Jia <redacted>
---
v1->v2:
- Turn off led when sysfs_create_group fails