Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

packet: minor: remove unused err assignment

This tiny patch removes two unused err assignments. In those two cases the
err variable is either overwritten with another value at a later point in
time without having read the previous assigment, or it is assigned and the
function returns without using/reading err after the assignment.

Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Daniel Borkmann and committed by
David S. Miller
342567cc e0c07557

-2
-2
net/packet/af_packet.c
··· 1907 1907 to_write -= dev->hard_header_len; 1908 1908 } 1909 1909 1910 - err = -EFAULT; 1911 1910 offset = offset_in_page(data); 1912 1911 len_max = PAGE_SIZE - offset; 1913 1912 len = ((to_write > len_max) ? len_max : to_write); ··· 1956 1957 1957 1958 mutex_lock(&po->pg_vec_lock); 1958 1959 1959 - err = -EBUSY; 1960 1960 if (saddr == NULL) { 1961 1961 dev = po->prot_hook.dev; 1962 1962 proto = po->num;