Skip to content

Commit 0bedaa2

Browse files
calvinjolinuxgregkh
authored andcommitted
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]>
1 parent fc9c03c commit 0bedaa2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hwtracing/coresight/coresight-cti-platform.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static int cti_plat_create_v8_etm_connection(struct device *dev,
120120

121121
/* Can optionally have an etm node - return if not */
122122
cs_fwnode = fwnode_find_reference(root_fwnode, CTI_DT_CSDEV_ASSOC, 0);
123-
if (IS_ERR_OR_NULL(cs_fwnode))
123+
if (IS_ERR(cs_fwnode))
124124
return 0;
125125

126126
/* allocate memory */
@@ -393,7 +393,7 @@ static int cti_plat_create_connection(struct device *dev,
393393
/* associated device ? */
394394
cs_fwnode = fwnode_find_reference(fwnode,
395395
CTI_DT_CSDEV_ASSOC, 0);
396-
if (!IS_ERR_OR_NULL(cs_fwnode)) {
396+
if (!IS_ERR(cs_fwnode)) {
397397
assoc_name = cti_plat_get_csdev_or_node_name(cs_fwnode,
398398
&csdev);
399399
fwnode_handle_put(cs_fwnode);

0 commit comments

Comments
 (0)