Don't go through the rest of the list if we found our table. Just return it
immediately.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
{
struct list_head *node;
struct dcss_hdr10_tbl_node *tbl_node;
- u32 *tbl = NULL;
list_for_each(node, head) {
tbl_node = container_of(node, struct dcss_hdr10_tbl_node, node);
if ((tbl_node->tbl_descriptor & desc) == desc)
- tbl = tbl_node->tbl_data;
+ return tbl_node->tbl_data;
}
- return tbl;
+ return NULL;
}
static int dcss_hdr10_get_tbls(struct dcss_hdr10_priv *hdr10, bool input,