Netdev List
 help / color / mirror / Atom feed
* [bug report] net: ti: icss-iep: Add pwidth configuration for perout signal
@ 2025-03-12  8:30 Dan Carpenter
  2025-03-12 10:04 ` [EXTERNAL] " Malladi, Meghana
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-03-12  8:30 UTC (permalink / raw)
  To: Meghana Malladi; +Cc: netdev

Hello Meghana Malladi,

Commit e5b456a14215 ("net: ti: icss-iep: Add pwidth configuration for
perout signal") from Mar 4, 2025 (linux-next), leads to the following
Smatch static checker warning:

	drivers/net/ethernet/ti/icssg/icss_iep.c:825 icss_iep_exit()
	error: NULL dereference inside function icss_iep_perout_enable()

drivers/net/ethernet/ti/icssg/icss_iep.c
    815 {
    816         if (iep->ptp_clock) {
    817                 ptp_clock_unregister(iep->ptp_clock);
    818                 iep->ptp_clock = NULL;
    819         }
    820         icss_iep_disable(iep);
    821 
    822         if (iep->pps_enabled)
    823                 icss_iep_pps_enable(iep, false);
    824         else if (iep->perout_enabled)
--> 825                 icss_iep_perout_enable(iep, NULL, false);
                                                    ^^^^
Originally icss_iep_perout_enable() just returned -ENOTSUPP but now it
needs a valid "req" pointer.

    826 
    827         return 0;
    828 }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [EXTERNAL] [bug report] net: ti: icss-iep: Add pwidth configuration for perout signal
  2025-03-12  8:30 [bug report] net: ti: icss-iep: Add pwidth configuration for perout signal Dan Carpenter
@ 2025-03-12 10:04 ` Malladi, Meghana
  0 siblings, 0 replies; 2+ messages in thread
From: Malladi, Meghana @ 2025-03-12 10:04 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: netdev, Anwar, Md Danish

Hi Dan,

On 3/12/2025 2:00 PM, Dan Carpenter wrote:
> Hello Meghana Malladi, Commit e5b456a14215 ("net: ti: icss-iep: Add 
> pwidth configuration for perout signal") from Mar 4, 2025 (linux-next), 
> leads to the following Smatch static checker warning: drivers/net/ 
> ethernet/ti/icssg/icss_iep. c: 825 icss_iep_exit()
> ZjQcmQRYFpfptBannerStart
> This message was sent from outside of Texas Instruments.
> Do not click links or open attachments unless you recognize the source 
> of this email and know the content is safe.
> Report Suspicious
> <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/G3vK! 
> uldq91elFod7SsXEXBPp_9qX4ctECpS267LMjuddHxR5XHrYWmLvT3__LcAfcksmi66Dt81ZKpDRPzWAf4qxRVheEM2g0eVMTQ0PmIw$>
> ZjQcmQRYFpfptBannerEnd
> 
> Hello Meghana Malladi,
> 
> Commit e5b456a14215 ("net: ti: icss-iep: Add pwidth configuration for
> perout signal") from Mar 4, 2025 (linux-next), leads to the following
> Smatch static checker warning:
> 
> 	drivers/net/ethernet/ti/icssg/icss_iep.c:825 icss_iep_exit()
> 	error: NULL dereference inside function icss_iep_perout_enable()
> 
> drivers/net/ethernet/ti/icssg/icss_iep.c
>      815 {
>      816         if (iep->ptp_clock) {
>      817                 ptp_clock_unregister(iep->ptp_clock);
>      818                 iep->ptp_clock = NULL;
>      819         }
>      820         icss_iep_disable(iep);
>      821
>      822         if (iep->pps_enabled)
>      823                 icss_iep_pps_enable(iep, false);
>      824         else if (iep->perout_enabled)
> --> 825                 icss_iep_perout_enable(iep, NULL, false);
>                                                      ^^^^
> Originally icss_iep_perout_enable() just returned -ENOTSUPP but now it
> needs a valid "req" pointer.

Thanks for identifying this bug. I will post a fix for this shortly.

regards,
Meghana Malladi

>      826
>      827         return 0;
>      828 }
> 
> regards,
> dan carpenter
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-12 10:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12  8:30 [bug report] net: ti: icss-iep: Add pwidth configuration for perout signal Dan Carpenter
2025-03-12 10:04 ` [EXTERNAL] " Malladi, Meghana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox