mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 03:22:37 +00:00
The original check for non-null "user" object was introduced by commite11fea92e1("kmsg: export printk records to the /dev/kmsg interface") when "user" could be NULL if /dev/ksmg was opened for writing. Subsequent change750afe7bab("printk: add kernel parameter to control writes to /dev/kmsg") made "user" context required for files opened for write, but didn't remove now redundant checks for it to be non-NULL. This patch removes the dead code while preserving the current logic. Signed-off-by: Stanislav Kinsburskii <[email protected]> CC: Petr Mladek <[email protected]> CC: Sergey Senozhatsky <[email protected]> CC: Steven Rostedt <[email protected]> CC: John Ogness <[email protected]> CC: [email protected] Reviewed-by: Sergey Senozhatsky <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/167929571877.2810.9926967619100618792.stgit@skinsburskii.localdomain