54
355 if (hw_ioctxt.rx_buf_sz_idx == -1)
356 return -EINVAL;
357
The loop doesn't make sense. We are looping through rx_buf_sz_table[]
until we hit 2048 or -1. But 2048 comes first so we always get there
and break.
We may as well replace all that code with:
hw_ioctxt.rx_buf_sz_idx = 11;
Something is very wrong.
regards,
dan carpenter
On Mon, Aug 21, 2017 at 02:52:34PM +, David Laight wrote:
> From: Dan Carpenter
> > Sent: 21 August 2017 10:48
> > The get_options() function takes the whole ARRAY_SIZE(). It doesn't
> > matter here because we don't use more than 7 elements.
> >
> > Signed-
The get_options() function takes the whole ARRAY_SIZE(). It doesn't
matter here because we don't use more than 7 elements.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/xircom/xirc2ps_cs.c
b/drivers/net/ethernet/xircom/xirc2ps_cs.c
index f71883
"map" is a valid pointer. We wanted to return "err" instead. Also
let's return a zero literal at the end.
Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/kernel/bpf/sy
I'm excited to see all the @realtek.com addresses. :)
Larry, you've migrated a bunch of staging code, and tried various
approaches. Do you have any lessons on what has worked and what hasn't
and if there is anything we can do to make the process better?
regards,
dan carpenter
ree_skb(skb);
69 }
70
71 tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN);
72 tag[0] = 0;
73 tag[1] = 1 << p->dp->index; /* destination port */
74
75 return nskb;
76 }
regards,
dan carpenter
These were copy and paste bugs, but I believe they are harmless.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
index e519795dff7c..9589b7e1d24c
This function has a copy and paste bug so it accidentally calls the add
function instead of the delete function.
Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08
SoC")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/driv
"ret" isn't necessarily initialized here.
Fixes: 9525ae83959b ("phylink: add phylink infrastructure")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 32917bdd1432..bcb4755bcd95 100644
--- a
This was supposed to be a bitwise OR but there is a || vs | typo.
Fixes: 864dc729d528 ("net: phy: marvell: Refactor m88e1121 RGMII delay
configuration")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
in
On Mon, Jul 31, 2017 at 10:37:16AM -0700, David Miller wrote:
> From: Dan Carpenter <dan.carpen...@oracle.com>
> Date: Mon, 31 Jul 2017 10:41:40 +0300
>
> > On Sat, Jul 29, 2017 at 11:28:55PM -0700, David Miller wrote:
> >> From: Dan Carpenter <dan.carpen...@o
On Sat, Jul 29, 2017 at 11:28:55PM -0700, David Miller wrote:
> From: Dan Carpenter <dan.carpen...@oracle.com>
> Date: Fri, 28 Jul 2017 17:45:11 +0300
>
> > - __u16 rval;
> > + __u16 rval = -1;
>
> Fixing a bogus warning by assigning a signed constant to an
&
My static checker complains that, if the allocation in mcs_get_reg()
fails, it means we use "rval" without initializing it. Small
allocations never fail in current kernels so it's not a major concern
but it's simple enough to silence the warning.
Signed-off-by: Dan Carpenter &
We forgot to set the error code on two error paths which means that we
return ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is
not expecting that and will have a NULL dereference.
Fixes: 546ac1ffb70d ("bpf: add devmap, a map for storing net device references")
Signed-o
If kmem_cache_zalloc() returns NULL then the INIT_LIST_HEAD(>links);
will Oops. The callers aren't really prepared for NULL returns so it
doesn't make a lot of difference in real life.
Fixes: 5240d9f95dfe ("libceph: replace message data pointer with list")
Signed-off-by:
but I somehow marked it as done
yesterday without sending a patch. Thanks for catching that.
The Smatch check is just looking for places where we do ERR_PTR(0) or
ERR_PTR(valid_ptr). That can be intentional, so there is some hand
reviewing involved.
regards,
dan carpenter
There are hidden gotos in the ceph_decode_* macros. We need to set the
"err" variable on these error paths otherwise we end up returning
ERR_PTR(0) which is NULL. It causes NULL dereferences in the callers.
Fixes: 278b1d709c6a ("libceph: ceph_decode_skip_* helpers")
Signed-o
The ipmr_get_table() function doesn't return error pointers it returns
NULL on error.
Fixes: 4f75ba6982bc ("net: ipmr: Add ipmr_rtm_getroute")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index bb909f1d7537..06863ea3fc5b
We accidentally free a NULL pointer and leak the pointer we want to
free. Also you can tell from the label name what was intended. :)
Fixes: abfcdc1de9bf ("nfp: add a stats handler for flower offloads")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/driv
On Mon, Jul 10, 2017 at 11:48:06AM +0200, Richard Cochran wrote:
> On Mon, Jul 10, 2017 at 12:38:16PM +0300, Dan Carpenter wrote:
> > There were two buggy commits so I chose the ealier one. The other buggy
>
> No, you are mistaken. In the original patch, NULL or PTR_ERR were
>
On Mon, Jul 10, 2017 at 11:21:03AM +0200, Richard Cochran wrote:
> On Mon, Jul 10, 2017 at 10:11:37AM +0300, Dan Carpenter wrote:
> > The ptp_clock_register() function returns NULL when it's #ifdefed out
> > because CONFIG_PTP_1588_CLOCK is disabled. Otherwise, it's intended to
&
We're checking ptp_clock_register() for NULL but we should be checking
for error pointers.
Fixes: 9c33e4208bce ("cxgb4: Add PTP Hardware Clock (PHC) support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.
dereferences in the callers.
Fixes: d94ba80ebbea ("ptp: Added a brand new class driver for ptp clocks.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index b77435783ef3..a50e96143a25 100644
--- a/drivers/ptp/p
ng?
No, you're right. It should be "sizeof(*crypto_info)".
It's hard for Smatch to catch these sorts of bugs because Sparse
sometimes just gives Smatch a number literal instead of a sizeof()
expression. I think Coccinelle can catch these kinds of bugs?
regards,
dan carpenter
My static checker complains that ofdpa_neigh_del() can sometimes free
"found". It just makes sense to use it first before deleting it.
Fixes: ecf244f753e0 ("rocker: fix maybe-uninitialized warning")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Most
We're accidentally returning the wrong variable. "cmode" is
uninitialized at this point so it causes a static checker warning.
Fixes: 6335e9f2446b ("net: dsa: mv88e6xxx: mv88e6390X SERDES support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a
of the value returned
In the original code, it's not returning the "actual size of the value
returned". It's returning a smaller or equal value... The man page is
correct that this is how some getsockopts work, of course. But here
-EFAULT is expected.
regards,
dan carpenter
On Fri, Jun 23, 2017 at 03:31:44AM -0700, Joe Perches wrote:
> On Fri, 2017-06-23 at 13:15 +0300, Dan Carpenter wrote:
> > The copy_to_user() function returns the number of bytes remaining but we
> > want to return -EFAULT here.
>
> because?
>
Rhetorical questio
On Fri, Jun 23, 2017 at 03:31:44AM -0700, Joe Perches wrote:
> On Fri, 2017-06-23 at 13:15 +0300, Dan Carpenter wrote:
> > The copy_to_user() function returns the number of bytes remaining but we
> > want to return -EFAULT here.
>
> because?
Because it's a failure path?
regards,
dan carpenter
The copy_to_user() function returns the number of bytes remaining but we
want to return -EFAULT here.
Fixes: 3c4d7559159b ("tls: kernel TLS support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
index 2ebc328bda
.
I try to report bugs as soon as they are introduced. I report it to
the author and CC the relevant list. If people don't respond to my
email after a month then I complain again.
regards,
dan carpenter
pposed to be a special type of success return. Here it is
just a fail return where we forgot to set the error code to
ERR_PTR(-ENOMEM).
regards,
dan carpenter
If we hit this error path we end up returning ERR_PTR(0) which is NULL.
The caller is not expecting that so it results in a NULL dereference.
Fixes: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com
ce.
Fixes: df71837d5024 ("[LSM-IPSec]: Security association restriction.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 86051b5879f2..02e6865421e8 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1157,
There are some missing error codes here so we accidentally return NULL
instead of an error pointer. It results in a NULL pointer dereference.
Fixes: df71837d5024 ("[LSM-IPSec]: Security association restriction.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
T
using offset relative to the
conventional network headers")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 164b5ac094be..7dc5892671c8 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -94,8 +94,10
The p_l2_info->pp_qid_usage[] array has "p_l2_info->queues" elements so
the > here should be a >= or we write beyond the end of the array.
Fixes: bbe3f233ec5e ("qed: Assign a unique per-queue index to queue-cid")
Signed-off-by: Dan Carpenter <dan.carpen...@or
>
Actually, it's the reverse. "key" is always NULL. Probably the ||
should be a &&?
regards,
dan carpenter
ion.
See slab_out_of_memory().
regards,
dan carpenter
We have the number of longs, but we need to calculate the number of
bytes required.
Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
b/drivers/net/ethern
We should call ipxitf_put() if the copy_to_user() fails.
Reported-by: 李强 <liqiang...@360.cn>
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 8a9219ff2e77..fa31ef29e3fa 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
("lwtunnel: check return value of nla_nest_start")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c
index 5cbed3816229..cfae3d5fe11f 100644
--- a/net/core/lwtunnel.c
+++ b/net/core/lwtunnel.c
@@ -203,7 +203,7 @@ int lwt
Presumably we never hit this return, but static checkers complain that
we need to unlock so we may as well fix that.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
b/drivers/net/ethernet/cavium/liquidio/octeon_mai
My static checker complains that we're holding a mutex on this error
path. Let's goto exit instead of returning directly.
Fixes: b0bccb69eba3 ("qed: Change locking scheme for VF channel")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Yuval, could you review this one
If skb_put_padto() fails then it frees the skb. I shifted that code
up a bit to make my error handling a little simpler.
Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/renesa
We dereference "skb" to get "skb->len" so we should probably do that
step before freeing the skb.
Fixes: eea221ce4880 ("tc35815 driver update (take 2)")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/toshiba/tc
If skb_pad() fails then it frees the skb so we should check for errors.
Fixes: bdabad3e363d ("net: Add Qualcomm IPC router")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
index c36b0ec364a4..a9a8c7d5a4a9 100644
--- a/net/q
; spin lock during the callback into the networking stack. Instead, how
> about the following diff, which also fixes the other call site...
>
I'm fine with this. I hated my changelog, as well because it sounds
like guess work. Could you send it with a:
Reported-by: Dan Carpenter <dan.carpen..
The labels were out of order, so it either could result in an Oops or a
leak.
Fixes: 48935bbb7ae8 ("net/mlx5e: IPoIB, Add netdevice profile skeleton")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c
b/driv
We've got the number of longs, yes, but we should multiply by
sizeof(long) to get the number of bytes needed.
Fixes: e4917d46a653 ("qede: Add aRFS support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Btw, this driver use vmalloc() all over the place but k
It's in Steffen's tree, not the networking tree and he's not CC'd. You
should really be adding Fixes tags because it helps to ensure you CC the
guilty parties.
regards,
dan carpenter
me that we
would recieve the same data two times. I asked the author but never
recieved a response.
I can't test this code, but I'm pretty sure my patch is correct.
Fixes: 4b063258ab93 ("dp83640: Delay scheduled work.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
di
This is a copy and paste buglet. We meant to test for ->write_mmd but
we test for ->read_mmd.
Fixes: 1ee6b9bc6206 ("net: phy: make phy_(read|write)_mmd() generic MMD
accessors")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/phy/phy-co
If "scope_len" is sizeof(scope_id) then we would put the NUL terminator
one space beyond the end of the buffer.
Fixes: b1a951fe469e ("net/utils: generic inet_pton_with_scope helper")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
This one goes through Jens
quot; is set to an error code.
567 pr_warn("RDS/IB: rds_ib_get_mr failed (errno=%d)\n",
ret);
568
569 if (rds_ibdev)
570 rds_ib_dev_put(rds_ibdev);
571
572 return ibmr;
573 }
regards,
dan carpenter
We should be returning -ENOMEM if qed_mcp_cmd_add_elem() fails. The
current code returns success.
Fixes: 4ed1eea82a21 ("qed: Revise MFW command locking")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
b/drivers/net
We accidentally left this dead code behind after commit 5952fde10c35
("net: sched: choke: remove dead filter classify code").
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
index 040625fdc82b..f11f8732b0d5 100644
There is a cut and paste bug here so we accidentally clear the first
few bytes of "resp" a second time instead clearing "ctx".
Fixes: 50c0add534d2 ("liquidio: refactor interrupt moderation code")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff
Presumably if there is an "add" function, there is also a "del"
function. But it causes a static checker warning because it looks like
a common cut and paste bug.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/sfc/efx.c b/driv
The dma_mapping_error() returns true if there is an error but we want
to return -ENOMEM and not 1.
Fixes: 65e0ace2c5cd ("net: dwc-xlgmac: Initial driver for DesignWare Enterprise
Ethernet")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ether
We could allocate less memory than intended because we do:
bnad->regdata = kzalloc(len << 2, GFP_KERNEL);
The shift can overflow leading to a crash. This is debugfs code so the
impact is very small.
Fixes: 7afc5dbde091 ("bna: Add debugfs interface.")
Signed-of
Bitwise & was obviously intended here.
Fixes: 745d8ae4622c ("net/mlx4: Spoofcheck and zero MAC can't coexist")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Applies to net.git.
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h
index e965e5
something.
1443 }
1444
1445 return true;
1446 }
regards,
dan carpenter
kstrtouint() can return a couple different error codes so the check for
"ret == -EINVAL" is wrong and static analysis tools correctly complain
that we can use "num" without initializing it. It's not super harmful
because we check the bounds. But it's also easy enough to fix.
This should be >= instead of > here. It means that we don't increment
the free count enough so it becomes off by one.
Fixes: 9ad1a3749333 ("dpaa_eth: add support for DPAA Ethernet")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Applies to -net tree.
di
On Mon, Feb 13, 2017 at 12:55:03PM +0100, walter harms wrote:
>
>
> Am 13.02.2017 12:00, schrieb Dan Carpenter:
> > We had intended to say "sizeof(u32)" but the "u" is missing.
> > Fortunately, sizeof(32) is also 4, so the original code still works.
>
We had intended to say "sizeof(u32)" but the "u" is missing.
Fortunately, sizeof(32) is also 4, so the original code still works.
Fixes: c4e7beea2192 ("net: qcom/emac: add ethtool support for reading hardware
registers")
Signed-off-by: Dan Carpenter <dan.
needed and not consistent with the rest of
the code.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/dsa/bcm_sf2_cfp.c b/drivers/net/dsa/bcm_sf2_cfp.c
index c71be3e0dc2d..346dd9a1232d 100644
--- a/drivers/net/dsa/bcm_sf2_cfp.c
+++ b/drivers/net/dsa/bcm_sf2_cfp.c
@@ -44
This bug is harmless because it's just a sanity check and we always
pass valid values for "encap_type" but the test is off by one.
Fixes: 9b4108012517 ("sfc: insert catch-all filters for encapsulated traffic")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
--
There is a "||" vs "|" typo here so we test 0x1 instead of 0x6.
Fixes: 1f8176f7352a ("net/mlx4_en: Check the enabling pptx/pprx flags in
SET_PORT wrapper flow")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/mellanox
dma_mapping_error() returns 1 if there is an error and 0 if not.
Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
b/drivers/net/ethernet/a
These checks are off by one. These are just sanity checks and we don't
ever pass invalid values for "encap_type" so it's harmless.
Fixes: 9b4108012517 ("sfc: insert catch-all filters for encapsulated traffic")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
Casting is a high precedence operation but "off" and "i" are in terms of
bytes so we need to have some parenthesis here.
Fixes: fbfa743a9d2a ("ipv6: fix ip6_tnl_parse_tlv_enc_lim()")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --gi
On Thu, Jan 26, 2017 at 12:23:02PM +0100, Ursula Braun wrote:
>
> On 01/26/2017 10:05 AM, Dan Carpenter wrote:
> > Say we got really unlucky and these failed on the last iteration, then
> > it could lead to a use after free bug.
> thanks for reporting this! I had already a s
Say we got really unlucky and these failed on the last iteration, then
it could lead to a use after free bug.
Fixes: cd6851f30386 ("smc: remote memory buffers (RMBs)")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
in
On Tue, Jan 24, 2017 at 07:14:11AM -0200, Marcelo Ricardo Leitner wrote:
> On Tue, Jan 24, 2017 at 12:05:40PM +0300, Dan Carpenter wrote:
> > We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so
> > it causes an off-by-one read overflow.
> >
> > Fixe
On Tue, Jan 24, 2017 at 07:14:11AM -0200, Marcelo Ricardo Leitner wrote:
> On Tue, Jan 24, 2017 at 12:05:40PM +0300, Dan Carpenter wrote:
> > We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so
> > it causes an off-by-one read overflow.
> >
> > Fixe
We shuffled some code around and added some new case statements here and
now "res" isn't initialized on all paths.
Fixes: 01fd12bb189a ("tipc: make replicast a user selectable option")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/tipc/so
We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so
it causes an off-by-one read overflow.
Fixes: 7b9438de0cd4 ("sctp: add stream reconf timer")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/sctp/debug.c b/net/sctp/debug.c
in
On Mon, Jan 23, 2017 at 10:44:34PM -0800, Alexei Starovoitov wrote:
> On Mon, Jan 23, 2017 at 5:27 AM, Arnaldo Carvalho de Melo
> <arnaldo.m...@gmail.com> wrote:
> > Em Sun, Jan 22, 2017 at 02:51:25PM -0800, Alexei Starovoitov escreveu:
> >> On Sat, Jan 21, 2017 at 07:5
On Mon, Jan 16, 2017 at 10:46:22PM +0100, Julia Lawall wrote:
>
>
> On Mon, 16 Jan 2017, Dan Carpenter wrote:
>
> > On Mon, Jan 16, 2017 at 12:19:24PM +0300, Dan Carpenter wrote:
> > > On Sun, Jan 15, 2017 at 10:14:38PM -0500, David Miller wrote:
> > &g
On Mon, Jan 16, 2017 at 12:19:24PM +0300, Dan Carpenter wrote:
> On Sun, Jan 15, 2017 at 10:14:38PM -0500, David Miller wrote:
> > From: Dan Carpenter <dan.carpen...@oracle.com>
> > Date: Thu, 12 Jan 2017 21:46:32 +0300
> >
> > > The break state
On Sun, Jan 15, 2017 at 10:14:38PM -0500, David Miller wrote:
> From: Dan Carpenter <dan.carpen...@oracle.com>
> Date: Thu, 12 Jan 2017 21:46:32 +0300
>
> > The break statement should be indented one more tab.
> >
> > Signed-off-by: Dan Carpenter <dan.carpen..
The break statement should be indented one more tab.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index ac32f9e..4daa8a3 100644
--- a/drivers/net/et
In commit 99d8d2159d7c ("irda: w83977af_ir: Neaten logging"), we
accidentally added an extra tab to these lines.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index f293d33fb28f..8d5
If we can't allocate the resources in gigaset_initdriver() then we
should return -ENOMEM instead of zero.
Fixes: 2869b23e4b95 ("[PATCH] drivers/isdn/gigaset: new M101 driver (v2)")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Ancient code.
diff --git a/drivers/
These two statements were not indented correctly so it's sort of
confusing.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/marvell/mvneta.c
b/drivers/net/ethernet/marvell/mvneta.c
index 5e5b259dd2cc..e05e22705cf7 100644
--- a/drivers/net/et
We never set "slots" in this function.
Fixes: a9380b0f7be8 ("drivers: net: xgene: Add support for Jumbo frame")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
I copied how slots gets set in xgene_enet_rx_frame(). Static analysis.
Not tested.
diff --git
We want to set the other "err" variable here so that we can return it
later. My version of GCC misses this issue but I caught it with a
static checker.
Fixes: 9f70eb339f52 ("net: ethernet: renesas: ravb: fix fixed-link phydev
leaks")
Signed-off-by: Dan Carpenter <d
We don't use ->heap_buf after commit 46d1efd852cc ("sfc: remove Software
TSO") so let's remove the last traces.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/sfc/net_driver.h
b/drivers/net/ethernet/sfc/net_driver.h
index f97f
On Thu, Nov 24, 2016 at 01:22:24PM +, Edward Cree wrote:
> On 24/11/16 11:16, Dan Carpenter wrote:
> > We don't use ->heap_buf after commit 46d1efd852cc ("sfc: remove Software
> > TSO") so let's remove the last traces.
> >
> > Signed-off-by:
Freeing "txq_info->uldtxq" is a no-op. We intended to free "txq_info".
Fixes: ab677ff4ad15 ("cxgb4: Allocate Tx queues dynamically")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.
We set "tgec->cfg" to NULL before passing it to kfree(). There is no
need to set it to NULL at all. Let's just delete it.
Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
I haven't tested this. I
We don't use ->heap_buf after commit 46d1efd852cc ("sfc: remove Software
TSO") so let's remove the last traces.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/sfc/net_driver.h
b/drivers/net/ethernet/sfc/net_driver.h
index f97f
We verified that MLX5_FLOW_CONTEXT_ACTION_COUNT was set on the first
line of the function so we don't need to check again here.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Not a bugfix so it would go into -next
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cor
We obviously intended a bitwise AND here, not a logical one.
Fixes: 8c978d059224 ("liquidio CN23XX: Mailbox support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
b/drivers/net/ethernet
"ret" needs to be signed for the error handling to work.
Fixes: abf0a1c2b26a ("amd-xgbe: Add support for SFP+ modules")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
b/drivers/net/ethernet/amd/xgbe/x
Looks good. This actually fixes my commit where I changed the return
PTR_ERR(NULL) which means success to PTR_ERR(-ESOMETHING).
Unintentionally returning success was the correct behavior.
regards,
dan carpenter
PTR_ERR(NULL) is success. We have to preserve the error code earlier.
Fixes: 7086605a6ab5 ("stmmac: fix error check when init ptp")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Applies to net.git tree.
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.
This is supposed to loop 1000 times and then give up. The problem is
it's a post-op and after the loop we test if "loop" is zero when really
it would be -1. Fix this by making it a pre-op.
Fixes: 1b7c55c4538b ("liquidio: CN23XX queue manipulation")
Signed-off-by: Dan C
101 - 200 of 322 matches
Mail list logo