powerpc/ps3: remove an unneeded NULL check
Subsystems (3)
PATCH 1/1 powerpc/ps3: remove an unneeded NULL check
Static checkers don't like the inconsistent NULL checking on "ops". This function is only called once and "ops" isn't NULL so the check can be removed.
Signed-off-by Dan Carpenter <[email protected]>
drivers/ps3/sys-manager-core.c +1 -1
@@ -43,7 +43,7 @@ void ps3_sys_manager_register_ops(const struct ps3_sys_manager_ops *ops) {BUG_ON (!ops);BUG_ON (!ops->dev); - ps3_sys_manager_ops = ops ? *ops : ps3_sys_manager_ops; + ps3_sys_manager_ops = *ops; }EXPORT_SYMBOL_GPL (ps3_sys_manager_register_ops);
Geoff Levand
maintainerHi Dan,
drivers/ps3/sys-manager-core.c void ps3_sys_manager_register_ops(const struct ps3_sys_manager_ops *ops) · line 46
Quoted 6 lines · Dan Carpenter
drivers/ps3/sys-manager-core.c +1
-1@@ -43,7 +43,7 @@ void ps3_sys_manager_register_ops(const struct ps3_sys_manager_ops *ops) {BUG_ON (!ops);BUG_ON (!ops->dev); - ps3_sys_manager_ops = ops ? *ops : ps3_sys_manager_ops; + ps3_sys_manager_ops = *ops;
This seems to be a left over from when I was adding the modular system-manager support. It doesn't really make sense if you look at how the ps3_sys_manager_ops variable is used.
I added your patch to my ps3-queue branch. Thanks for the contribution.
-Geoff