staging: gasket: fix class create bug handling
PATCH RESEND 1/1 staging: gasket: fix class create bug handling
From: Todd Poynor <[email protected]>
class_create() never returns NULL, and this driver should never return PTR_ERR(NULL) anyway.
Reported-by Dmitry Torokhov <[email protected]>
Signed-off-by Zhongze Hu <[email protected]>
Signed-off-by Todd Poynor <[email protected]>
--- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gasket/gasket_core.c +1 -1
@@ -332,7 +332,7 @@ int gasket_register_device(const struct gasket_driver_desc *driver_desc) internal->class =class_create (driver_desc->module, driver_desc->name); -if (IS_ERR_OR_NULL (internal->class)) { +if (IS_ERR (internal->class)) {gasket_nodev_error ("Cannot register %s class [ret=%ld]" , driver_desc->name,PTR_ERR (internal->class));return PTR_ERR (internal->class);
Signature · 4 lines
2.18.0.203.gfac676dfb9-goog Resending, extracted from the previous stack of patches that needs other cleanups.