Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 666dc7c9 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

pktcdvd: fix defective misuses of pkt_<level>



Fix thinkos where pkt_<level> needs a valid pktcdvd_device * and the
pointer is known to be NULL.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> (go smatch!)
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f3ded788
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2360,7 +2360,7 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio)

	pd = q->queuedata;
	if (!pd) {
		pkt_err(pd, "%s incorrect request queue\n",
		pr_err("%s incorrect request queue\n",
		       bdevname(bio->bi_bdev, b));
		goto end_io;
	}
@@ -2841,7 +2841,7 @@ static int pkt_remove_dev(dev_t pkt_dev)
			break;
	}
	if (idx == MAX_WRITERS) {
		pkt_dbg(1, pd, "dev not setup\n");
		pr_debug("dev not setup\n");
		ret = -ENXIO;
		goto out;
	}