diff mbox series

[net] sunhme: Uninitialized variable in happy_meal_init()

Message ID Y0kuLdMUdLCHF+fe@kili (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net] sunhme: Uninitialized variable in happy_meal_init() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter Oct. 14, 2022, 9:38 a.m. UTC
The "burst" string is only initialized for CONFIG_SPARC.

Fixes: 24cddbc3ef11 ("sunhme: Combine continued messages")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/ethernet/sun/sunhme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sean Anderson Oct. 14, 2022, 1:36 p.m. UTC | #1
On 10/14/22 05:38, Dan Carpenter wrote:
> The "burst" string is only initialized for CONFIG_SPARC.
> 
> Fixes: 24cddbc3ef11 ("sunhme: Combine continued messages")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>   drivers/net/ethernet/sun/sunhme.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
> index 62deed210a95..efaa6a8eadec 100644
> --- a/drivers/net/ethernet/sun/sunhme.c
> +++ b/drivers/net/ethernet/sun/sunhme.c
> @@ -1328,7 +1328,7 @@ static int happy_meal_init(struct happy_meal *hp)
>   	void __iomem *erxregs      = hp->erxregs;
>   	void __iomem *bregs        = hp->bigmacregs;
>   	void __iomem *tregs        = hp->tcvregs;
> -	const char *bursts;
> +	const char *bursts = "";
>   	u32 regtmp, rxcfg;
>   
>   	/* If auto-negotiation timer is running, kill it. */

This should be "64" to match the value used by PCI.

--Sean
diff mbox series

Patch

diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index 62deed210a95..efaa6a8eadec 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -1328,7 +1328,7 @@  static int happy_meal_init(struct happy_meal *hp)
 	void __iomem *erxregs      = hp->erxregs;
 	void __iomem *bregs        = hp->bigmacregs;
 	void __iomem *tregs        = hp->tcvregs;
-	const char *bursts;
+	const char *bursts = "";
 	u32 regtmp, rxcfg;
 
 	/* If auto-negotiation timer is running, kill it. */