There was a missing assignment so the if (ret) on the next line is
never true.
Fixes: f21fb3ed364b ('Add support of Cavium Liquidio ethernet adapters')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
b/drivers/net/ethernet
We need to unlock before returning here.
Fixes: a0d2f20650e8 ('Renesas Ethernet AVB PTP clock driver')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/net/ethernet/renesas/ravb_ptp.c
b/drivers/net/ethernet/renesas/ravb_ptp.c
index 42656da..7a8ce92 100644
--- a/drivers
We return success if mlx5e_alloc_sq_db() fails but we should return an
error code.
Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet
functionality')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
. You could just leave the num_ out. Almost
all variables are numbers in C so it doesn't add anything.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
On Thu, May 28, 2015 at 01:52:47PM +, KY Srinivasan wrote:
-Original Message-
From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
Sent: Thursday, May 28, 2015 12:06 AM
To: KY Srinivasan
Cc: da...@davemloft.net; netdev@vger.kernel.org; linux-
ker...@vger.kernel.org; de
ETH_DATA_LEN || mtu limit)
+ if (mtu 68 || mtu limit)
How did you calculate 68? Avoid magic numbers like this, make it a
define.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More
through the normal review process. The intern process is over
this year. The lack of normal review introduced a number of bugs this
year. I always complain to Greg about it and he says that I should join
the intern mailing list if I care so much.
regards,
dan carpenter
--
To unsubscribe from this list
I'm annoyed already since
we have been dealing with the fallout for months and I always make sure
to complain whenever I have a chance. /me shakes a fist! Grrr :P
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord
as a favour to us.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
is easy to delete. Or even just
apply them first, and we tell people to send follow on patches or revert
as needed. My whole setup revolves around email so finding and
reviewing patches using git log is awkward.
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe
,
it never went through the list.
I'm fine with 5 bugs per 900 patches or whatever. I wish that the
patches came to the list, but I get that that would double your review
workload to review 900 patches on the outreachy list and again on the
normal dev list.
regards,
dan carpenter
--
To unsubscribe
There were missing curly braces so it means we call add_debugfs_mem()
unintentionally.
Fixes: 3ccc6cf74d8c ('cxgb4: Adds support for T6 adapter')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
b/drivers/net/ethernet/chelsio
Add or remove some tabs so that statements line up correctly.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
index 9e0b670..b83ca7f 100644
--- a/drivers/net/ethernet
If register_hdlc_device() fails, the current code returns 0 but we
should return an error code instead.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 7193b73..848ea6a 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net
You can't use kstrtoul() with an int or it causes memory corruption.
Also j should be unsigned or we have underflow bugs.
I considered changing j to unsigned long but everything fits in a u32.
Fixes: 8e3d04fd7d70 ('cxgb4: Add MPS tracing support')
Signed-off-by: Dan Carpenter dan.carpen
On Tue, Aug 18, 2015 at 07:28:53PM +0900, Tetsuo Handa wrote:
Dan Carpenter wrote:
You can't use kstrtoul() with an int or it causes memory corruption.
Also j should be unsigned or we have underflow bugs.
I considered changing j to unsigned long but everything fits in a u32.
Excuse me
On Thu, Jul 30, 2015 at 01:57:43PM +0200, Pablo Neira Ayuso wrote:
I have also appended this chunk, since synproxy is also affected:
Thanks. I have rechecked my scripts and I *should* have caught that.
I'm not sure what went wrong...
regards,
dan carpenter
--
To unsubscribe from this list
but it seems safe to limit len to
INT_MAX - 4095.
Fixes: a8c879a7ee98 ('RDS: Info and stats')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/net/rds/info.c b/net/rds/info.c
index 9a6b4f6..140a44a 100644
--- a/net/rds/info.c
+++ b/net/rds/info.c
@@ -176,7 +176,7 @@ int rds_info_getsockopt
err = PTR_ERR(dev);
454 dev = NULL;
455 goto errout;
456 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
. There is no cleanup necessary so I changed the gotos to
direct returns.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index 88cfaa2..d933059 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -337,14 +337,14 @@ static unsigned
The loop iterates one space too far, so we might read beyond the end of
the func_limit[] array.
Fixes: 35578d798400 ('bpf: Implement function bpf_perf_event_read() that get
the selected hardware PMU conuter')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/kernel/bpf
The dma_mapping_error() function returns true or false. We should
return -ENOMEM if it there is a dma mapping error.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/net/ethernet/micrel/ks8842.c
b/drivers/net/ethernet/micrel/ks8842.c
index f78909a..09d2e16 100644
If register_netdev() fails we return success but we should return an
error code instead.
Reported-by: RUC_Soft_Sec zy900...@163.com
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 2ffbf13..dcb6bb7 100644
We recently changed this from nf_conntrack_alloc() to nf_ct_tmpl_alloc()
so the error handling needs to changed to check for NULL instead of
IS_ERR().
Fixes: 0838aa7fcfcd ('netfilter: fix netns dependencies with conntrack
templates')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff
changed on a bind.
Fixes: 902fefb82ef7 ('packet: improve socket create/bind latency in some cases')
Signed-off-by: Lars Westerhoff lars.westerh...@newtec.eu
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
Reviewed-by: Daniel Borkmann dbork...@redhat.com
diff --git a/net/packet/af_packet.c b/net
this morning and
they all seem fine...
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
kfree_skb() is correct here.
Fixes: ffce41962ef6 ('lwtunnel: support dst output redirect function')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c
index bb58826..5f7fae7 100644
--- a/net/core/lwtunnel.c
+++ b/net/core/lwtunnel.c
instead.
if (ret != 0 != 0)
return ret;
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
instead of the ret.
Hi Dan, I read this as a humor. :-)
:)
regards,
dan carpenter
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Jul 23, 2015 at 01:10:57PM +0300, Dan Carpenter wrote:
In this specific case, writing it as if (ret != 0) caused the bug. If
we had written it as if (ret) return ret; then there are no zeroes so
wouldn't have been any temptation to return the zero instead of the ret.
I did a search
Oh. Crap... My mistake. Sorry for the noise. The original code is
fine.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
We accidentally return success instead of -ENOMEM here.
Fixes: fe56b9e6a8d9 ('qed: Add module with basic common support')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c
b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index b
MODE_MF_SI is 9. We should be testing bit 9 instead of AND 0x9.
Fixes: fe56b9e6a8d9 ('qed: Add module with basic common support')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c
b/drivers/net/ethernet/qlogic/qed/qed_dev.c
We check if "p_hwfn" is NULL and then dereference it in the error
handling code. I read the code and it isn't NULL so let's remove the
check.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/qed/qed_int.c
b/drivers/net/eth
064 nfc_put_device(dev);
It should not call nfc_put_device() because that happens after goto
exit.
1065 rc = -ENODEV;
1066 goto exit;
1067 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscrib
This is decrementing the pointer, instead of the value stored in the
pointer. KASan detects it as an out of bounds reference.
Reported-by: "Berry Cheng 程君(成淼)" <chengmiao...@alibaba-inc.com>
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
This bug predates
The should be =. I also added spaces around the '-' operations so
the code is a little more consistent and matches the condition better.
Fixes: f53c3fe8dad7 ('xen-netback: Introduce TX grant mapping')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/net/xen-netback
k: add API to retrieve all group memberships')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 59651af..76a8466 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2373,7 +2373,7 @@ static int ne
line 970 to a break and delete lines 1016 and
1017?
1018
1019 break;
1020 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
We added new locking to this function but we missed one error path which
needs an unlock.
Fixes: cdacad4993f4 ('netconsole: use per-attribute show and store methods')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
This is going through Nicholas Bellinger's tree not net-next.
dev_kfree_skb_any(skb);
4417 }
4418 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
"written" has to be signed for the error handling to work.
trans->ops->send_pkt() returns an int so that's fine.
Fixes: 80a19e338d45 ('VSOCK: Introduce virtio-vsock-common.ko')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/vmw_vsock/virtio_tra
The "err = " assignment is missing here.
Fixes: 0d65fc13042f ('mlxsw: spectrum: Implement LAG port join/leave')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
b/drivers/net/ethernet/mellanox/mlxsw/spectrum
We already know "err" is zero so there is no need to check.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
index 4dad146..913106d 100644
--- a/drivers/net/e
On Tue, Dec 15, 2015 at 11:13:50PM +0300, Dan Carpenter wrote:
> On Tue, Dec 15, 2015 at 01:13:41PM -0500, David Miller wrote:
> > From: Dan Carpenter <dan.carpen...@oracle.com>
> > Date: Tue, 15 Dec 2015 16:56:16 +0300
> >
> > > The problem here is
On Tue, Dec 15, 2015 at 01:13:41PM -0500, David Miller wrote:
> From: Dan Carpenter <dan.carpen...@oracle.com>
> Date: Tue, 15 Dec 2015 16:56:16 +0300
>
> > The problem here is that at the end of the loop we test for if
> > idc->vnic_wait_limit is zero,
e end with cnt set to 0.
Fixes: cae86d4a4e56 ('mISDN: Add driver for Infineon ISDN chipset family')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c
b/drivers/isdn/hardware/mISDN/mISDNipac.c
index a77eea5..cb428b9 100644
--- a/dri
_TIMEO" (30) to "QLCNIC_DEV_NPAR_OPER_TIMEO + 1" so
that we still loop the same number of times as before.
Fixes: 486a5bc77a4a ('qlcnic: Add support for 83xx suspend and resume.')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlo
The problem here is that after the loop we test for "if (!i) " but
because "i--" is a post-op we exit with i set to -1. I have fixed this
by changing it to a pre-op instead. I had to change the starting value
from 3 to 4 so that we still iterate 3 times.
Signed-off-by: Dan C
We test for if "tries" is zero at the end but "tries--" is a post-op so
it will end with "tries" set to -1. I have changed it to a pre-op
instead.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/sfc/txc431
At the end of the loop we test "if (!count)" but because "count--" is
a post-op then the loop will end with count set to -1. I have fixed
this by changing it to --count.
Fixes: c5aa9e3b8156 ('amd-xgbe: Initial AMD 10GbE platform driver')
Signed-off-by: Dan Carpenter <d
uspend and resume.')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
v2: different color on the bikeshed
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
index be7d7a6..b1a452f 100644
--- a/drivers/net/eth
RTISED_ASYM_PAUSE;
635 if (fc == PAUSE_RX)
636 lc->advertising |=
ADVERTISED_PAUSE;
637 }
638 }
639 phy->ops->advertise(phy, lc->advertising);
regard
is the correct
thing but it's not "worthwhile". It is not a good use of my time.
Please stop sending cleanup patches, Markus. Just send fixes.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@
The original code is fine.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
le and they go against the author's original intention. I
tend to agree that useless initializers are bad and disable GCCs
uninitialized variable warnings but just because I agree with you
doesn't make it official kernel style. It's slightly rude to go against
the author's intention.
regards,
dan carp
omplicated (that's actually what caused the bug in this patch, in fact).
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jan 04, 2016 at 02:17:40PM +0100, Bjørn Mork wrote:
> Dan Carpenter <dan.carpen...@oracle.com> writes:
>
> > Please stop sending cleanup patches, Markus. Just send fixes.
>
> Thanks for your continued but unwarranted belief in AI.
>
I always tell peopl
We checked "err" on the lines before so we know it's zero here.
These cause a static checker warning because checking known things can
indicate a bug. Maybe there is a missing assignment or we are checking
the wrong variable.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com
pause_time is unsigned so it can't be less than zero. The bug means
that we allow invalid pause-times.
Fixes: 57ba4c9b56d8 ('fsl/fman: Add FMan MAC support')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
b/drive
the bitwise negate.
It's cleaner to use the kernel's ALIGN() macro instead.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
I think this patch is correct, but I haven't tested it, so please review
carefully.
diff --git a/drivers/net/ethernet/freescale/fman/fman_sp.c
b/drivers/net/et
"priv" is allocated with devm_kzalloc() so freeing it here with kfree()
will lead to a double free.
Fixes: 3933961682a3 ('fsl/fman: Add FMan MAC driver')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/freescale/fman/mac.c
b/driv
No. This patch is a suspend resume thing and your bug is something
else. Honestly, this patch is a static checker fix and I doubt it has
much real worl impact at all.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message
On Wed, Jan 06, 2016 at 03:27:38PM -0500, David Miller wrote:
> From: Dan Carpenter <dan.carpen...@oracle.com>
> Date: Wed, 6 Jan 2016 13:03:08 +0300
>
> > diff --git a/drivers/net/ethernet/freescale/fman/fman_sp.c
> > b/drivers/net/ethernet/freescale/fman/fman_sp.c
In the original code, if we succeeded on the last iteration through the
loop then we still returned failure.
Fixes: 389e4e04ad2d ('qlcnic: fix a timeout loop')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
b/d
On Tue, Nov 24, 2015 at 10:19:39AM -0200, Mauro Dreissig wrote:
> Cleaning rtl871x_ioctl_rtl.c.
>
It's better if you think about the header and the body as two different
things. Just repeat the title but with more information.
regards,
dan carpenter
--
To unsubscribe from this list
WARN_ON_ONCE() takes a condition, it doesn't take an error message. I
have converted this to WARN() instead.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index 35a9788..c7d1adc 100644
--- a/net/hsr/hsr_device.c
+++ b/n
could lead to memory
corruption.
Fixes: dbb799c39717 ('qed: Initialize hardware for new protocols')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
index d85b7ba..1c35f37 100644
--- a/d
The iadev->rx_open[] array holds "iadev->num_vc" pointers (this code
assumes that pointers are 32 bits). So the > here should be >= or else
we could end up reading a garbage pointer from one element beyond the
end of the array.
Signed-off-by: Dan Carpenter <dan.carpen..
rly in the 30 40 range. I added them as reserved 37 to
reserved 40. It's possible that strings are really supposed to be added
in the middle instead of at the end, but this approach is safe, in that
it fixes the bug and doesn't break anything that wasn't already broken.
Signed-off-by: Dan Carpen
If we pass ERR_PTR(-EFAULT) to kfree() then it's going to oops.
Fixes: 2ece068e1b1d ('ptp: use memdup_user().')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 0b1ac6b..d637c93 100644
--- a/drivers/ptp/ptp_cha
"up_map" is a u64 type but we're not using the high 32 bits.
Fixes: 35c55c9877f8 ('tipc: add neighbor monitoring framework')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/tipc/monitor.c b/net/tipc/monitor.c
index 87d4efe..0d489e8 100644
--- a/net/tipc
of Cavium Liquidio ethernet adapters')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c
b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 1126422..41ee8bd 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+
We don't use "i" in this function.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c
b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 715ddfa..1126422 100644
--- a/drivers/net/ethernet/cavium/liquidio/
Remove a stray space character and fix an if statement that wasn't
indented.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Speaking of style issues, this whole file follows return 1 on error
and 0 on success. It was confusing for me. It's not too late to change
it to use c
rxrpc_lookup_peer_rcu() returns NULL on error, it never returns error
pointers.
Fixes: be6e6707f6ee ('rxrpc: Rework peer object handling to use hash table and
RCU')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 47fb167..e
x data path routines')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Not tested.
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
index 7bd6f25..607bb7d 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
We were changing return values and accidentally made
rocker_world_port_obj_vlan_add() into a no-op.
Fixes: fccd84d44912 ('rocker: return -EOPNOTSUPP for undefined world ops')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/rocker/rocker_main.c
b/d
We intended to return PTR_ERR() here instead of 1.
Fixes: 1f9993f6825f ('rocker: fix a neigh entry leak issue')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
We recently moved rocker files around so this only applies to -next.
Probably returning the wrong error code is ha
of_phy_connect() returns NULL on error, it never returns error pointers.
Fixes: 656e705243fd ('net-next: mediatek: add support for MT7623 ethernet')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
b/drivers/net/ethernet/me
There was a missing unlock on the error path.
Fixes: 656e705243fd ('net-next: mediatek: add support for MT7623 ethernet')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 9
ret;" for
clarity.
Fixes: 94fe8c683cea ('ks8842: Support DMA when accessed via timberdale')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/micrel/ks8842.c
b/drivers/net/ethernet/micrel/ks8842.c
index 09d2e16..cb0102d 100644
--- a/drivers/net/et
'.
> This is not consistent.
>
Good catch. be16_to_cpu(scan_info->size) is correct. It's surprising
that this bug wasn't caught in testing...
regards,
dan carpenter
We could end up dereferencing an error pointer when we call
regulator_disable().
Fixes: 4bdcb1dd9feb ('net: Add MDIO bus driver for the Allwinner EMAC')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/phy/mdio-sun4i.c b/drivers/net/phy/mdio-sun4i.c
index f
We accidentally return success instead of a negative error code.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/wireless/marvell/libertas/main.c
b/drivers/net/wireless/marvell/libertas/main.c
index b35b8bc..8541cbe 100644
--- a/drivers/net/wireless/m
h + index));
return error;
then Smatch still breaks that up into two separate returns which imply
initialized vs uninitialized.
regards,
dan carpenter
one where I could have done that but I deliberately didn't
because I wanted the uninitialized warning if I made a mistake. It
sounds like you're working around a GCC bug...
regards,
dan carpenter
We accidentally return IS_ERR(priv->base) which is 1 instead of
PTR_ERR(priv->base) which is the error code.
Fixes: 6c821bd9edc9 ('net: Add MOXA ART SoCs ethernet driver')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/moxa/moxart_ether.c
b
This is never called with a NULL "buf" and anyway, we dereference 's' on
the lines before so it would Oops before we reach the check.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 79de588..0dd0224 100644
--- a/n
"priority" needs to be signed for the error handling to work.
Fixes: 39651abd2814 ('qed: add support for dcbx.')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Applies to the main net tree.
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
b/drivers/net/eth
If qlcnic_fw_cmd_get_minidump_temp() fails then "fw_dump->tmpl_hdr" is
NULL or possibly freed. It can lead to an oops later.
Fixes: d01a6d3c8ae1 ('qlcnic: Add support to enable capability to extend
minidump for iSCSI')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.
This line was indented more than it should be.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
Acked-by: Yuval Mintz <yuval.mi...@qlogic.com>
---
v2: fix a typo
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c
b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 6ffc
This line was intended more than it should be.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c
b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 6ffc21d..05fcb25 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
r(rx_ring,
netdev_priv(rx_ring->ndev),
491 status);
492 ret = -EIO;
493 goto out;
494 }
regards,
dan carpenter
hecked dereference inside the function call.
913 iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue,
sta);
914 rcu_read_unlock();
915 }
regards,
dan carpenter
"data_split" was never set to false. It's just uninitialized.
Fixes: 2950219d87b0 ('qede: Add basic network device support')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c
b/drivers/net/ethernet/qlogic/qede/q
My static checker complains that we are using "autoneg" without
initializing it. The problem is the ->phy_read() condition is reversed
so we only set this on error instead of success.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/eth
We removed this initialization but it is required. Let's put it back.
Fixes: 895106a577c4 ('i40e: trivial fixes')
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/intel/i40e/i40e_hmc.c
b/drivers/net/ethernet/intel/i40e/i40e_hmc.c
index 5ebe12d..a
My static checker complained that "v" can be used unintialized if
netxen_rom_fast_read() returns -EIO. That function never actually
returns -1.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
b/drivers/net
The error handling is broken here. netxen_rom_fast_read() returns zero
on success and -EIO on error. It never returns -1.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
b/drivers/net/ethernet/qlogic/
1 - 100 of 322 matches
Mail list logo