As general rule i agree. But here either we have address or not,+static void __iomemI can find code snippets above like
+*vfe_parent_dev_ops_get_base_address(struct camss *camss, int id)
+{
+ if (id < camss->res->vfe_num) {
+ struct vfe_device *vfe = &camss->vfe[id];
+
+ return vfe->base;
+ }
+
+ return NULL;
if (IS_ERR(csid->base))
...
So, is it really a good idea to return NULL on error? Probably it might
be better
to return a reasonable error to the caller.
i dont see the reason to return an error code. Also i dont see what
caller will do if he gets error code instead of NULL.
I am refering in particular this case. If we have different error paths
of failiure maybe it will more sense.