lkml.org 
[lkml]   [2023]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 20/28] net: wan: Add framer framework support
> +int framer_pm_runtime_get(struct framer *framer)
> +{
> + int ret;
> +
> + if (!framer)
> + return 0;

Can framer be a NULL pointer? This sort of test often covers up
bugs. So either let it dereference the NULL pointer and opps, or
return -EINVAL.

Andrew

\
 
 \ /
  Last update: 2023-08-01 11:57    [W:0.569 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site