device property: Drop redundant NULL checks

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2067252

commit 27e0bcd02990f7291adb0f111e300f06c495d509
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Tue, 26 Oct 2021 19:29:54 +0300

In cases when functions are called via fwnode operations,
we already know that this is software node we are dealing
with, hence no need to check if it's NULL, it can't be,

Reported-by: YE Chengfeng <cyeaa@connect.ust.hk>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211026162954.89811-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
This commit is contained in:
Mark Langsdorf 2022-05-02 15:49:19 -04:00
parent f9d7629552
commit 8dd87d24f0
1 changed files with 0 additions and 6 deletions

View File

@ -413,9 +413,6 @@ software_node_get_name(const struct fwnode_handle *fwnode)
{
const struct swnode *swnode = to_swnode(fwnode);
if (!swnode)
return "(null)";
return kobject_name(&swnode->kobj);
}
@ -507,9 +504,6 @@ software_node_get_reference_args(const struct fwnode_handle *fwnode,
int error;
int i;
if (!swnode)
return -ENOENT;
prop = property_entry_get(swnode->node->properties, propname);
if (!prop)
return -ENOENT;