# Re: \[PATCH v2 20/28\] net: wan: Add framer framework support

- From: Herve Codina \<herve.codina@bootlin.com\>
- Date: 2023-08-01 10:32:13 
- List: netdev
- Page: https://ratatoskr.run/netdev/2023/08/2286989
- Thread: https://ratatoskr.run/netdev/2023/07/2280248/t.md

```text
On Tue, 1 Aug 2023 11:56:12 +0200
Andrew Lunn [ref] wrote:

> > +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.
> 

Well, in the current usage, it cannot be a NULL pointer.
I will simply remove the check (every where it is present) and
dereference the pointer instead of returning -EINVAL.

Regards,
Hervé

-- 
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
```
