X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fdax%2Fbus.c;h=df238c8b6ef2c9a03f7b815d03129498cdc25294;hb=4e4ced93794acb42adb19484132966defba8f3a6;hp=46e46047a1f78724eca4ee9dcd35a541018386bd;hpb=790514ed7715334949125de39989720dc0985f15;p=linux-2.6-microblaze.git diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 46e46047a1f7..df238c8b6ef2 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -421,8 +421,10 @@ struct dev_dax *__devm_create_dev_dax(struct dax_region *dax_region, int id, * device outside of mmap of the resulting character device. */ dax_dev = alloc_dax(dev_dax, NULL, NULL, DAXDEV_F_SYNC); - if (!dax_dev) + if (IS_ERR(dax_dev)) { + rc = PTR_ERR(dax_dev); goto err; + } /* a device_dax instance is dead while the driver is not attached */ kill_dax(dax_dev);