Merge "diag: Fix issues with peripheral buffering control packets"

This commit is contained in:
Linux Build Service Account 2015-06-20 14:20:25 -07:00 committed by Gerrit - the friendly Code Review server
commit 6ea21b3adb
1 changed files with 5 additions and 2 deletions

View File

@ -1150,9 +1150,12 @@ int diag_send_buffering_tx_mode_pkt(uint8_t peripheral,
int err = 0;
struct diag_ctrl_peripheral_tx_mode ctrl_pkt;
if (!peripheral || !params)
if (!params)
return -EIO;
if (peripheral >= NUM_PERIPHERALS)
return -EINVAL;
if (!driver->feature[peripheral].peripheral_buffering) {
pr_debug("diag: In %s, peripheral %d doesn't support buffering\n",
__func__, peripheral);
@ -1202,7 +1205,7 @@ int diag_send_buffering_wm_values(uint8_t peripheral,
return -EIO;
if (peripheral >= NUM_PERIPHERALS)
return -EIO;
return -EINVAL;
if (!driver->feature[peripheral].peripheral_buffering) {
pr_debug("diag: In %s, peripheral %d doesn't support buffering\n",