mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
coresight: cti: remove incorrect NULL return check
fwnode_find_reference() doesn't return NULL and hence that check should be avoided. Signed-off-by: Calvin Johnson <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
fc9c03ce30
commit
0bedaa2d6a
1 file changed
+2
-2
@@ -120,7 +120,7 @@ static int cti_plat_create_v8_etm_connection(struct device *dev,
|
||||
|
||||
/* Can optionally have an etm node - return if not */
|
||||
cs_fwnode = fwnode_find_reference(root_fwnode, CTI_DT_CSDEV_ASSOC, 0);
|
||||
if (IS_ERR_OR_NULL(cs_fwnode))
|
||||
if (IS_ERR(cs_fwnode))
|
||||
return 0;
|
||||
|
||||
/* allocate memory */
|
||||
@@ -393,7 +393,7 @@ static int cti_plat_create_connection(struct device *dev,
|
||||
/* associated device ? */
|
||||
cs_fwnode = fwnode_find_reference(fwnode,
|
||||
CTI_DT_CSDEV_ASSOC, 0);
|
||||
if (!IS_ERR_OR_NULL(cs_fwnode)) {
|
||||
if (!IS_ERR(cs_fwnode)) {
|
||||
assoc_name = cti_plat_get_csdev_or_node_name(cs_fwnode,
|
||||
&csdev);
|
||||
fwnode_handle_put(cs_fwnode);
|
||||
|
||||
Reference in new issue
Block a user