On Mon, Jan 16, 2017 at 10:02:57PM +0800, fgao@xxxxxxxxxx wrote: > From: Gao Feng <fgao@xxxxxxxxxx> > > The return value of nf_tables_table_lookup is valid pointer or one > pointer error. There are two cases totally. > case1: IS_ERR(table) is true, it would return the error or reset the > table as NULL, it is unnecessary to perform the latter check > "table != NULL". > case2: IS_ERR(obj) is false, the table is one valid pointer. It is also > unnecessary to perform that check. > The nf_tables_newset and nf_tables_newobj have same logic codes. > > In summary, we could move the block of condition check "table != NULL" > in the else block to eliminate the original condition checks. Applied, thanks feng. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html