Thread (21 messages) 21 messages, 4 authors, 2019-02-26

Re: [PATCH net-next v3 6/6] devlink: add missing NULL checks for devlink ops

From: Jakub Kicinski <hidden>
Date: 2019-02-25 18:32:58

On Sun, 24 Feb 2019 12:03:19 +0100, Jiri Pirko wrote:
Fri, Feb 22, 2019 at 11:07:57PM CET, jakub.kicinski@netronome.com wrote:
quoted
Commit 76726ccb7f46 ("devlink: add flash update command") and
commit 2d8dc5bbf4e7 ("devlink: Add support for reload")
access devlink ops without NULL-checking. Add the missing checks.
Note that all drivers currently implementing devlink pass non-NULL
ops, so this is not a problem.  
Wouldn't it be better to rather put WARN_ON&fail when driver calls
devlink_alloc() with NULL ops and avoid these checks in the whole code?
Sounds good! Should I remove the existing ones?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help