Message ID | 20211112214709.1763928-1-sstabellini@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | xen: don't continue xenstore initialization in case of errors | expand |
On 12.11.2021 22:47, Stefano Stabellini wrote: > --- a/drivers/xen/xenbus/xenbus_probe.c > +++ b/drivers/xen/xenbus/xenbus_probe.c > @@ -983,8 +983,10 @@ static int __init xenbus_init(void) > */ > proc_create_mount_point("xen"); > #endif > + return err; Personally I think such cases would better be "return 0". With that done here, err's initializer could (imo should) then also be dropped. Jan > out_error: > + xen_store_domain_type = XS_UNKNOWN; > return err; > } > >
On Mon, 15 Nov 2021, Jan Beulich wrote: > On 12.11.2021 22:47, Stefano Stabellini wrote: > > --- a/drivers/xen/xenbus/xenbus_probe.c > > +++ b/drivers/xen/xenbus/xenbus_probe.c > > @@ -983,8 +983,10 @@ static int __init xenbus_init(void) > > */ > > proc_create_mount_point("xen"); > > #endif > > + return err; > > Personally I think such cases would better be "return 0". With > that done here, err's initializer could (imo should) then also > be dropped. I'll make both changes in the next version > > out_error: > > + xen_store_domain_type = XS_UNKNOWN; > > return err; > > } > > > > >
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index bd003ca8acbe..34abf2b5967b 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -983,8 +983,10 @@ static int __init xenbus_init(void) */ proc_create_mount_point("xen"); #endif + return err; out_error: + xen_store_domain_type = XS_UNKNOWN; return err; }