Эх сурвалжийг харах

Fix a const pointer usage warning in the Digigram pcxhr soundcard driver

Fix a const pointer usage warning in the Digigram pcxhr compatible soundcard
driver.  A const pointer is being passed to copy_from_user() to load the
firmware into.  This is okay in this case because the function has allocated
the firmware struct itself, but the const qualifier is part of the firmware
struct - so the patch casts the const away.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Howells 17 жил өмнө
parent
commit
67852dc08c

+ 1 - 1
sound/pci/pcxhr/pcxhr_hwdep.c

@@ -394,7 +394,7 @@ static int pcxhr_hwdep_dsp_load(struct snd_hwdep *hw,
 			   (unsigned long)fw.size);
 			   (unsigned long)fw.size);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
-	if (copy_from_user(fw.data, dsp->image, dsp->length)) {
+	if (copy_from_user((void *)fw.data, dsp->image, dsp->length)) {
 		vfree(fw.data);
 		vfree(fw.data);
 		return -EFAULT;
 		return -EFAULT;
 	}
 	}