diff options
| author | Maxime Ripard <mripard@kernel.org> | 2019-10-03 10:59:29 +0300 | 
|---|---|---|
| committer | Maxime Ripard <mripard@kernel.org> | 2019-10-03 10:59:29 +0300 | 
| commit | 77fdaa091d79c87323a9f3912a25f73e02ea2a01 (patch) | |
| tree | 0e47e2d3c4a966277dbaec075f4685187fdae482 /lib/sg_split.c | |
| parent | e2c4ed148cf3ec8669a1d90dc66966028e5fad70 (diff) | |
| parent | 54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c (diff) | |
| download | linux-77fdaa091d79c87323a9f3912a25f73e02ea2a01.tar.xz | |
Merge drm/drm-fixes into drm-misc-fixes
We haven't backmerged for a while, let's start the -rc period by pulling
rc1.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'lib/sg_split.c')
| -rw-r--r-- | lib/sg_split.c | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/sg_split.c b/lib/sg_split.c index 9982c63d1063..60a0babebf2e 100644 --- a/lib/sg_split.c +++ b/lib/sg_split.c @@ -176,11 +176,13 @@ int sg_split(struct scatterlist *in, const int in_mapped_nents,  	 * The order of these 3 calls is important and should be kept.  	 */  	sg_split_phys(splitters, nb_splits); -	ret = sg_calculate_split(in, in_mapped_nents, nb_splits, skip, -				 split_sizes, splitters, true); -	if (ret < 0) -		goto err; -	sg_split_mapped(splitters, nb_splits); +	if (in_mapped_nents) { +		ret = sg_calculate_split(in, in_mapped_nents, nb_splits, skip, +					 split_sizes, splitters, true); +		if (ret < 0) +			goto err; +		sg_split_mapped(splitters, nb_splits); +	}  	for (i = 0; i < nb_splits; i++) {  		out[i] = splitters[i].out_sg;  | 
