Merge tag 'gpio-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[sfrench/cifs-2.6.git] / drivers / mailbox / pcc.c
index ac91fd0d62c6e4e22c57ab354ceb56adfdaee48e..cbca5e51b9759c57813b8579a2d38318bab39e02 100644 (file)
@@ -92,7 +92,7 @@ static struct mbox_controller pcc_mbox_ctrl = {};
  */
 static struct mbox_chan *get_pcc_channel(int id)
 {
-       if (id < 0 || id > pcc_mbox_ctrl.num_chans)
+       if (id < 0 || id >= pcc_mbox_ctrl.num_chans)
                return ERR_PTR(-ENOENT);
 
        return &pcc_mbox_channels[id];