]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/mtd/nand/nandsim.c
Merge tag 'for-linus-20131112' of git://git.infradead.org/linux-mtd
[karo-tx-linux.git] / drivers / mtd / nand / nandsim.c
index fdcc5bd3c06bc9c08bd6159ffe58af173645a6d2..42e8a770e631c6eb4f98658cd9cef88d08ca1350 100644 (file)
@@ -575,7 +575,7 @@ static int alloc_device(struct nandsim *ns)
                cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600);
                if (IS_ERR(cfile))
                        return PTR_ERR(cfile);
-               if (!cfile->f_op || (!cfile->f_op->read && !cfile->f_op->aio_read)) {
+               if (!cfile->f_op->read && !cfile->f_op->aio_read) {
                        NS_ERR("alloc_device: cache file not readable\n");
                        err = -EINVAL;
                        goto err_close;