return ERR_PTR(-EINVAL); if ((!len && kbuf) || (len && !kbuf)) return ERR_PTR(-EINVAL);  rq = blk_get_request(q, rw, gfp_mask); if (!rq) return ERR_PTR(-ENOMEM); 
return -EINVAL; if (!len || !kbuf) return -EINVAL; 
struct request *blk_rq_map_kern(request_queue_t *q, int rw, void *kbuf,				unsigned int len, unsigned int gfp_mask){	struct request *rq;	struct bio *bio;	if (len > (q->max_sectors << 9))		return ERR_PTR(-EINVAL);	if ((!len && kbuf) || (len && !kbuf))		return ERR_PTR(-EINVAL);	rq = blk_get_request(q, rw, gfp_mask);	if (!rq)		return ERR_PTR(-ENOMEM);	bio = bio_map_kern(q, kbuf, len, gfp_mask);	if (!IS_ERR(bio)) {		if (rw)			bio->bi_rw |= (1 << BIO_RW);		rq->bio = rq->biotail = bio;		blk_rq_bio_prep(q, rq, bio);		rq->buffer = rq->data = NULL;		rq->data_len = len;		return rq;	}	/*	 * bio is the err-ptr	 */	blk_put_request(rq);	return (struct request *) bio;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/dd1cab95f356f1395278633565f198463cf6bd24/ll_rw_blk.c/clean/drivers/block/ll_rw_blk.c