1 Oct
2020
1 Oct
'20
2:01 p.m.
On Wed, Sep 30, 2020 at 03:50:46PM -0700, Dave Ertman wrote:
+int ancillary_device_initialize(struct ancillary_device *ancildev) +{
- struct device *dev = &ancildev->dev;
- dev->bus = &ancillary_bus_type;
- if (WARN_ON(!dev->parent) || WARN_ON(!ancildev->name) ||
WARN_ON(!(dev->type && dev->type->release) && !dev->release))
return -EINVAL;
You have a lot of WARN_ON() calls in this patch. That blows up anyone who runs with panic-on-warn, right?
If these are things that we have to have, then just test and properly return an error, don't cause a potential crash.
thanks,
greg k-h