Mathieu Desnoyers wrote: > Now that alloc_dax() returns ERR_PTR(-EOPNOTSUPP) rather than NULL, > the callers do not have to handle NULL return values anymore. > > Signed-off-by: Mathieu Desnoyers <[email protected]> > Cc: Alasdair Kergon <[email protected]> > Cc: Mike Snitzer <[email protected]> > Cc: Mikulas Patocka <[email protected]> > Cc: Andrew Morton <[email protected]> > Cc: Linus Torvalds <[email protected]> > Cc: Dan Williams <[email protected]> > Cc: Vishal Verma <[email protected]> > Cc: Dave Jiang <[email protected]> > Cc: Matthew Wilcox <[email protected]> > Cc: Arnd Bergmann <[email protected]> > Cc: Russell King <[email protected]> > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > --- > drivers/nvdimm/pmem.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c > index f1d9f5c6dbac..e9898457a7bd 100644 > --- a/drivers/nvdimm/pmem.c > +++ b/drivers/nvdimm/pmem.c > @@ -558,8 +558,8 @@ static int pmem_attach_disk(struct device *dev, > disk->bb = &pmem->bb; > > dax_dev = alloc_dax(pmem, &pmem_dax_ops); > - if (IS_ERR_OR_NULL(dax_dev)) { > - rc = IS_ERR(dax_dev) ? PTR_ERR(dax_dev) : -EOPNOTSUPP; > + if (IS_ERR(dax_dev)) { > + rc = PTR_ERR(dax_dev);
Oh... I see you cleanup what I was talking about later in the series. For my taste I don't like to see tech-debt added and then removed later in the series. The whole series would appear to get smaller by removing the alloc_dax() returning NULL case from the beginning, and then doing the EOPNOTSUPP fixups. ...repeat this comment for patch 10, 11, 12.
