Skip to content

Commit e9628e0

Browse files
Yang Yinglianggregkh
authored andcommitted
class: use IS_ERR_OR_NULL() helper in class_unregister()
Use IS_ERR_OR_NULL() helper in class_unregister() to simplify code. Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 07b7b88 commit e9628e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ EXPORT_SYMBOL_GPL(__class_create);
260260
*/
261261
void class_destroy(struct class *cls)
262262
{
263-
if ((cls == NULL) || (IS_ERR(cls)))
263+
if (IS_ERR_OR_NULL(cls))
264264
return;
265265

266266
class_unregister(cls);

0 commit comments

Comments
 (0)