From: Miaoqian Lin <hidden> Date: 2021-12-11 14:02:02
The phy_attach() function does not return NULL. It returns error pointers.
Signed-off-by: Miaoqian Lin <redacted>
---
drivers/net/ethernet/broadcom/genet/bcmmii.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Joe Perches <joe@perches.com> Date: 2021-12-12 02:44:09
On Sat, 2021-12-11 at 14:01 +0000, Miaoqian Lin wrote:
The phy_attach() function does not return NULL. It returns error pointers.
Perhaps all the functions that return error pointers rather than
NULL on error should be marked with a special attribute:
Something like:
#define __returns_nonnull __attribute__((__returns_nonnull__))
---
include/linux/compiler_attributes.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller [off-list ref]:
On Sat, 11 Dec 2021 14:01:53 +0000 you wrote:
The phy_attach() function does not return NULL. It returns error pointers.
Signed-off-by: Miaoqian Lin <redacted>
---
drivers/net/ethernet/broadcom/genet/bcmmii.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)