Skip to content

Commit

Permalink
usb: typec: mux: remove redundant check on variable match
Browse files Browse the repository at this point in the history
All the code paths that lead to the return statement are where
match is always true, hence the check to see if it is true is
redundant and can be removed.

Detected by CoverityScan, CID#14769672 ("Logically dead code")

Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Colin Ian King authored and gregkh committed Feb 20, 2019
1 parent 98bba54 commit eb76b37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/typec/mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static void *typec_mux_match(struct device_connection *con, int ep, void *data)
if (dev_fwnode(mux->dev) == con->fwnode)
return mux;

return match ? ERR_PTR(-EPROBE_DEFER) : NULL;
return ERR_PTR(-EPROBE_DEFER);
}

/**
Expand Down

0 comments on commit eb76b37

Please sign in to comment.