Re: [PATCH 4/4] staging: octeon: handle rx/tx initialization failures in probe
From: Dan Carpenter
Date: Mon Jun 29 2026 - 15:40:52 EST
On Mon, Jun 29, 2026 at 09:49:49PM +0530, Prashant Rahul wrote:
> On Mon Jun 29, 2026 at 1:14 PM IST, Dan Carpenter wrote:
> > cvmx_pko_shutdown() has a built in call to
> > cvmx_pko_disable() so why are we calling that separately?
>
> Didn't realize cvmx_pko_shutdown did that. Will remove that. Also, Should
> I remove the cvmx_pko_disable() call in the remove function in this patch
> series? Or should I do that in a new patch?
>
> > Also I feel like probe() should fail if alloc_netdev() fails
> > or register_netdev(), but that's not introduced by this patch
> > either.
>
> My main goal with the patch series was to get rid of panic() calls in
> some of the initialization error paths. I will look into properly handling
> alloc_etherdev and register_netdev errors but in new patch(es).
To be honest, I would keep your patch as-is instead of being more
ambitious. If you get much more ambitious then we'd need to test
it. Right now, we're only affecting paths which would have caused
a panic in the original code, but if we added error checking for
register_netdev() then there is a chance of breaking something.
I was just saying that this might not be 100% correct, but it
doesn't break anything that wasn't broken in the original so
it's fine.
regards,
dan carpenter